MCPcopy Create free account
hub / github.com/espnet/espnet / get_commandline_args

Function get_commandline_args

espnet2/legacy/utils/cli_utils.py:9–44  ·  view source on GitHub ↗

Get command line arguments.

()

Source from the content-addressed store, hash-verified

7
8
9def get_commandline_args():
10 """Get command line arguments."""
11 extra_chars = [
12 " ",
13 ";",
14 "&",
15 "(",
16 ")",
17 "|",
18 "^",
19 "<",
20 ">",
21 "?",
22 "*",
23 "[",
24 "]",
25 "$",
26 "`",
27 '"',
28 "\\",
29 "!",
30 "{",
31 "}",
32 ]
33
34 # Escape the extra characters for shell
35 argv = [
36 (
37 arg.replace("'", "'\\''")
38 if all(char not in arg for char in extra_chars)
39 else "'" + arg.replace("'", "'\\''") + "'"
40 )
41 for arg in sys.argv
42 ]
43
44 return sys.executable + " " + " ".join(argv)
45
46
47def is_scipy_wav_style(value):

Callers 15

convertFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
concatjson.pyFile · 0.90
mainFunction · 0.90
addjson.pyFile · 0.90
convertFunction · 0.90
convertFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…