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

Function get_argv

crates/stdlib/src/syslog.rs:29–42  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

27 use libc::{LOG_AUTHPRIV, LOG_CRON, LOG_PERROR};
28
29 fn get_argv(vm: &VirtualMachine) -> Option<PyStrRef> {
30 if let Some(argv) = vm.state.config.settings.argv.first()
31 && !argv.is_empty()
32 {
33 return Some(
34 PyStr::from(match argv.find('\\') {
35 Some(value) => &argv[value..],
36 None => argv,
37 })
38 .into_ref(&vm.ctx),
39 );
40 }
41 None
42 }
43
44 #[derive(Debug)]
45 enum GlobalIdent {

Callers 1

openlogFunction · 0.85

Calls 5

SomeClass · 0.50
firstMethod · 0.45
is_emptyMethod · 0.45
into_refMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected