Import the Python module with the specified name.
(py: Python, name: &str)
| 41 | |
| 42 | /// Import the Python module with the specified name. |
| 43 | pub fn import(py: Python, name: &str) -> PyResult<PyModule> { |
| 44 | let name = CString::new(name).unwrap(); |
| 45 | unsafe { err::result_cast_from_owned_ptr(py, ffi::PyImport_ImportModule(name.as_ptr())) } |
| 46 | } |
| 47 | |
| 48 | /// Return the dictionary object that implements module's namespace; |
| 49 | /// this object is the same as the `__dict__` attribute of the module object. |
nothing calls this directly
no test coverage detected