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" <lall...@lgwm.org> wrote in message news:heir4g$oh...@aioe.org...
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