blob: 1ae63d2b763bc6151cd50d5ce3dd6fb28f627125 (
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
|