[Python-Dev] Import hassle

Fred L. Drake, Jr. fdrake@acm.org
Thu, 26 Jul 2001 19:17:07 -0400 (EDT)


Martin Sj=F6gren writes:
 > Even more interesting, say that I create a submodule and throw in a =
bunch
 > of PyCFunctions in it (I stole the code from InitModule since I don'=
t know
 > how to fake submodules in a C module in another way, is there a way?=
). I

Martin,
  You can take a look at the code in pyexpat.c's init function; this
creates a couple of module objects to hold constants in segregated
namespaces.  I'm not sure that it does everything it needs to to
properly build up all the namespaces, but it should do reasonably
well.


  -Fred

--=20
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation