PyImport_Import fails on linux
geert.van.muylem at utimaco.be
geert.van.muylem at utimaco.be
Thu Jun 30 11:16:24 EDT 2005
Hi all,
I'm currently migrating an application from a windows platform to linux.
I have somewhere a module which uses embedded python: (a python script
where I want to call some functions...)
// Initialize the python library
Py_Initialize();
PyObject *pName = PyString_FromString("RASBatch");
// Load the Python module
m_pModule = PyImport_Import(pName);
if (m_pModule != NULL)
{
...
}
else
{
...
}
Loading the module always returns NULL...
When starting python on the command line, I can import the python script
and execute the function which i want to call from my C module.
I've tried also copying the script on several locations...
Anyone any idea?
(Using python 2.2 on suse8.2)
Thanks in advance!
Geert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050630/0d95e178/attachment.html>
More information about the Python-list
mailing list