Embedding question

Randy Heiland heiland at ncsa.uiuc.edu
Fri Jun 11 12:47:06 EDT 1999


While I wade thru some docs, maybe someone can answer this straightaway.

Python 1.5.2
IRIX 6.4

In a C++ pgm, I can successfully do this:

  PyRun_SimpleString("import string");

and this:
  PyRun_SimpleString("from math import *");

however, I cannot do this:
  PyRun_SimpleString("from myStuff import *")

where "myStuff" is a shared lib (.so) found in my PYTHONPATH.

I can do this just fine from the interpreter, i.e.:

Python 1.5.2 (#9, Jun  3 1999, 14:44:16) [C] on irix646
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> from myStuff import *

Any tips?

thanks,
--Randy  (heiland at ncsa.uiuc.edu)





More information about the Python-list mailing list