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

Method get_env_path

crates/stdlib/src/ssl.rs:1314–1321  ·  view source on GitHub ↗

Helper: Get path from Python's os.environ

(
            environ: &PyObject,
            var_name: &str,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

1312
1313 /// Helper: Get path from Python's os.environ
1314 fn get_env_path(
1315 environ: &PyObject,
1316 var_name: &str,
1317 vm: &VirtualMachine,
1318 ) -> PyResult<String> {
1319 let path_obj = environ.get_item(var_name, vm)?;
1320 path_obj.try_into_value(vm)
1321 }
1322
1323 /// Helper: Try to load certificates from Python's os.environ variables
1324 ///

Callers

nothing calls this directly

Calls 2

try_into_valueMethod · 0.80
get_itemMethod · 0.45

Tested by

no test coverage detected