()
| 2 | use pyo3::types::IntoPyDict; |
| 3 | |
| 4 | fn main() -> Result<(), ()> { |
| 5 | Python::with_gil(|py| { |
| 6 | main_(py).map_err(|e| { |
| 7 | // We can't display Python exceptions via std::fmt::Display, |
| 8 | // so print the error here manually. |
| 9 | e.print_and_set_sys_last_vars(py); |
| 10 | }) |
| 11 | }) |
| 12 | } |
| 13 | |
| 14 | fn main_(py: Python) -> PyResult<()> { |
| 15 | let sys = py.import("sys")?; |