embedded python example: PyString_FromString doesnt work?

Brano Zarnovican zarnovican at pobox.sk
Fri Mar 25 04:35:17 EST 2005


> wierd. does:
http://www.python.org/doc/2.3.­2/ext/pure-embedding.html work
> for you ?

Yes. It does.

> ./test_String script1.py  multiply 4 5

Don't run it with the ".py" suffix. The argv[1] is a module name, not a
filename..

Even if you do, it may not find the module. Depending of what you have
in PYTHONPATH. Try also:

export PYTHONPATH=.

> I believe you have to call Py_SetProgramName before Py_Initialize,

Yes. This is another way to affect the search path.

BranoZ




More information about the Python-list mailing list