SWIG trouble...

Randall Hopper aa8vb at yahoo.com
Tue Oct 19 15:52:44 EDT 1999


Magnus L. Hetland:
 |I'm just having some trouble making SWIG work properly, and I wondered
 |if maybe it was a standard problem... I've compiled it, and it runs
 |and generates wrappers etc., but when I import the resulting modules
 |in Python, I get stuff like:
 |
 |>>> dir(example)
 |['__doc__', '__file__', '__name__', 'cvar', '\200\242 ', '\320&
 |\034\320\006 \034\322\002 \014\200\242`']
 |>>> 

Haven't seen that problem myself.

Are you using shadow classes or no?

  If yes (example.py), see what example.py looks like.

  If no (example.c), probably due to some trash in your .i file or the .h
  file's you're %importing.  Check out the PyMethodDef array at the bottom
  of the generated example.c wrapper module and the init<module> function
  right below it.  Is there trash in the strings being registered with
  Python?

A shot in the dark, but hopefully this gives you something to work with.

Randall




More information about the Python-list mailing list