Create a new module object with the `__name__` attribute set to name.
(py: Python, name: &str)
| 35 | impl PyModule { |
| 36 | /// Create a new module object with the `__name__` attribute set to name. |
| 37 | pub fn new(py: Python, name: &str) -> PyResult<PyModule> { |
| 38 | let name = CString::new(name).unwrap(); |
| 39 | unsafe { err::result_cast_from_owned_ptr(py, ffi::PyModule_New(name.as_ptr())) } |
| 40 | } |
| 41 | |
| 42 | /// Import the Python module with the specified name. |
| 43 | pub fn import(py: Python, name: &str) -> PyResult<PyModule> { |
nothing calls this directly
no test coverage detected