Hi list,

I have a little question about whats' the best way for add - no replace -
new path into python c embedding environment for this situation.

I'm using PyObject_CallObject(pfunc, pArgs); for call one function of some
module loaded with PyImport_Import function. PyImport_Import function search
this module into system path list object. I read some examples about
Py_GetPath and PySys_SetPath and i think some examples are wrong or can be
misinterpreted.

Py_GetPath make only a basic path, some sitautions are considred for make
this path, for example read environment varialbes.
PySys_SetPath overwrite all path list object.

When Py_Initialitze it's called sys path object is generated with Py_GetPath
content and a other directories added by site.py file pre processor.

The best way for add new path before call PyImport_Import is adding new
string item into sys path object ?

Bye and thks to all


-- 
Pau Freixes
Linux GNU/User
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to