Roland Plüss, 20.05.2014 19:17: > PyObject * const loadedModule = Py_InitModule3( fullname, NULL, "Loaded > module" ); > PyObject * const moduleDict = PyModule_GetDict( loadedModule ); // > borrowed reference > PyDict_SetItemString( moduleDict, "__builtins__", PyEval_GetBuiltins() ); > PyRun_StringFlags( fileContent, Py_file_input, moduleDict, moduleDict, > NULL ); > > Hopefully this works also in Py3 should I switch some time later. But I > guess it should seeing how simple the import now became.
The general principle should still work, just the module creation has changed. Stefan -- https://mail.python.org/mailman/listinfo/python-list