added module::import statement

This commit is contained in:
Wenzel Jakob
2015-10-13 23:44:25 +02:00
parent 9329669683
commit db028d685c
4 changed files with 11 additions and 1 deletions

View File

@@ -466,6 +466,10 @@ public:
attr(name) = result;
return result;
}
static module import(const char *name) {
return module(PyImport_ImportModule(name), false);
}
};
NAMESPACE_BEGIN(detail)