_PyRun_SimpleFileObject Execute a Python file with __main__ module setup. Sets __file__ and __cached__ before execution, removes them after.
(&self, scope: Scope, path: &str)
| 79 | /// Execute a Python file with __main__ module setup. |
| 80 | /// Sets __file__ and __cached__ before execution, removes them after. |
| 81 | fn run_simple_file(&self, scope: Scope, path: &str) -> PyResult<()> { |
| 82 | self.with_simple_run(path, |module_dict| { |
| 83 | self.run_simple_file_inner(module_dict, scope, path) |
| 84 | }) |
| 85 | } |
| 86 | |
| 87 | fn run_simple_file_inner( |
| 88 | &self, |
no test coverage detected