blob: 873f9d44b41709f8841828e0063a292b14e176d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
import shlex
def parse_cli_args_to_dict(cli_args: str):
args_dict = {}
for arg in shlex.split(cli_args):
if "=" in arg:
key, value = arg.split("=")
args_dict[key] = value
else:
args_dict[arg] = None
return args_dict
|