basic type creation (C->python)

Dave Marotti landshark at verticaladdiction.net
Thu Aug 22 00:49:26 EDT 2002


Hello,

I was going through the "noddy" example of creating a new type for python and
ran into some difficulties.

Everything seems to compile ok (I use "python setup.py build"), but when I run
python and attempt to import noddy, I get this:

[landshark at burrito ~/pytype/build/lib.linux-i686-1.5]$ python
Python 1.5.2 (#1, Apr  3 2002, 18:16:26)  [GCC 2.96 20000731 (Red Hat Linux 7.2
2 on linux-i386
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import noddy
Traceback (innermost last):
File "<stdin>", line 1, in ?
ImportError: ./noddy.so: undefined symbol: PyObject_Del
>>>

Just as it says, and nm on the noddy.so file shows all Py* methods as
undefined.  I'm assuming this is normal since they are in the python
executable... but how do I get around this so I can use the new type?
  


-- 
+-----------------------------+----------------------------------------------+
| Dave Marotti                | Looking for a Visio alternative for *nix?    |
| lndshark ! speakeasy net    | Kivio : http://thekompany.com/projects/kivio |
+-----------------------------+----------------------------------------------+
| I just don't trust anything | Duct tape is like the force.  It has a light |
| that bleeds for 5 days and  | side and a dark side, and it holds the       |
| doesn't die. - Mr. Garrison | universe together.  - Carl Zwanzig           |
+-----------------------------+----------------------------------------------+




More information about the Python-list mailing list