Merge branch 'rupertnash-master'
* rupertnash-master: Make python shadow sub-modules runable
This commit is contained in:
commit
c8bb566822
1 changed files with 1 additions and 1 deletions
|
|
@ -713,7 +713,7 @@ public:
|
|||
*/
|
||||
Printv(default_import_code, "def swig_import_helper():\n", NULL);
|
||||
Printv(default_import_code, tab4, "import importlib\n", NULL);
|
||||
Printv(default_import_code, tab4, "pkg = __name__.rpartition('.')[0]\n", NULL);
|
||||
Printv(default_import_code, tab4, "pkg = __package__ if __package__ else __name__.rpartition('.')[0]\n", NULL);
|
||||
Printf(default_import_code, tab4 "mname = '.'.join((pkg, '%s')).lstrip('.')\n", module);
|
||||
Printv(default_import_code, tab4, "try:\n", NULL);
|
||||
Printv(default_import_code, tab8, "return importlib.import_module(mname)\n", NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue