Looks like one way to do that is to use something like:

   s.sprintf(
     "import imp\n"
     "imp.load_source('%s', r'%s')", modname, script_path);
   PyRun_SimpleString(s.c_str());

Unless someone has a better suggestion.

Regards,
Elias
"lallous" <[email protected]> wrote in message news:[email protected]...
Hello

PyObject* PyImport_ImportModule( const char *name)
How to specify a full file path instead and a module name?

Like PyImport_SomeFunction(const char *path_to_script, const char *name)

Thanks,
Elias
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to