'Import sys' succeeds in C++ embedded code, but module is not fully visible

Ivan Illarionov ivan.illarionov at gmail.com
Tue Jan 13 20:55:11 EST 2009


Ben Sizer <kylo... at gmail.com> wrote:
> What am I doing wrong?

What are you trying to achieve?
If you want to modify sys.path I suggest using Python/C API directly:
(boilerplate removed)
PyImport_ImportModule("sys")
PyObject_GetAttrString(sysmod_pointer, "path")
PyList_Insert(pathobj_pointer, 0, path_python_str)

--
Ivan





More information about the Python-list mailing list