mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-08 15:29:45 +00:00
added module::import statement
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user