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

Method insert_sys_path

crates/vm/src/vm/mod.rs:2196–2200  ·  view source on GitHub ↗
(&self, obj: PyObjectRef)

Source from the content-addressed store, hash-verified

2194 }
2195
2196 pub fn insert_sys_path(&self, obj: PyObjectRef) -> PyResult<()> {
2197 let sys_path = self.sys_module.get_attr("path", self).unwrap();
2198 self.call_method(&sys_path, "insert", (0, obj))?;
2199 Ok(())
2200 }
2201
2202 pub fn run_module(&self, module: &str) -> PyResult<()> {
2203 let runpy = self.import("runpy", 0)?;

Callers 4

run_fileFunction · 0.80
run_rustpythonFunction · 0.80
py_mainFunction · 0.80
mainFunction · 0.80

Calls 3

unwrapMethod · 0.45
get_attrMethod · 0.45
call_methodMethod · 0.45

Tested by

no test coverage detected