Arg! [Long]

Fred L. Drake, Jr. fdrake at acm.org
Tue Dec 21 16:25:00 EST 1999


Magnus L. Hetland writes:
 > Suddenly it works. Hm. So it actually needs sourcecode - i'd say
 > that's quite a shortcoming <wink>

  You'll just have to get over that one... ;)

 > Except... As long as the source file is called spammodule, it seems
 > that the module name is also spammodule, although I would like it to
 > be called spam (which is what I called in the setup file, like the
 > example in the docs...)

  If you try "import spammodule" it should fail:

>>> import parsermodule
Traceback (innermost last):
  File "<stdin>", line 1, in ?
ImportError: dynamic module does not define init function (initparsermodule)

  (Only yours will say "initspammodule".)
  If you want the .so to be named spam.so, rename the source file to
spam.c and adjust Setup.in to say:

       *shared*
       spam spam.c


  -Fred

--
Fred L. Drake, Jr.	  <fdrake at acm.org>
Corporation for National Research Initiatives




More information about the Python-list mailing list