MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_module

Method run_module

crates/vm/src/vm/mod.rs:2202–2207  ·  view source on GitHub ↗
(&self, module: &str)

Source from the content-addressed store, hash-verified

2200 }
2201
2202 pub fn run_module(&self, module: &str) -> PyResult<()> {
2203 let runpy = self.import("runpy", 0)?;
2204 let run_module_as_main = runpy.get_attr("_run_module_as_main", self)?;
2205 run_module_as_main.call((module,), self)?;
2206 Ok(())
2207 }
2208
2209 pub fn fs_encoding(&self) -> &'static PyStrInterned {
2210 identifier!(self, utf_8)

Callers 3

_fixup_main_from_nameFunction · 0.80
install_pipFunction · 0.80
run_rustpythonFunction · 0.80

Calls 3

importMethod · 0.45
get_attrMethod · 0.45
callMethod · 0.45

Tested by

no test coverage detected