First off this is in unix.

I have a C file that has python embedded in it.  In the script I have
the following

PyRun_SimpleString(code);

where
code = "import mymodule"

however I get this error

Traceback (most recent call last):
  File "<string>", line 1, in ?
ImportError: No module named mymodule
Object not found
Segmentation fault

If i just run python from my local path then type "import mymodule" in
the python prompt this is fine.  I'm guessing when I am embedding my
python script in the C code the local directory is no longer the
directory where my C code resides.  How can i tell python to load the
module from my current local directory?  

Thanks.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to