Embedded execfile() doesn't work!

Miles Rizzo milesrizzo at hotmail.com
Mon Mar 27 23:08:31 CEST 2000

I'm trying to embed execfile() in a C++ app. I'm calling Py_Initialize(),
then PyRun_SimpleString("execfile('pytest.py')").  The interpreter always
gives me a "no such filename or directory" error. Printing the sys.path
gives the correct path, and running the same execfile at a Python command
line works fine.

I'm using VC++ 6.0. Can anyone point me in the right direction?

More information about the Python-list mailing list