If you pass string like this to your python as program argument
my.py name1=abc name2='def' name3="ghi klm"
then sys.args will return list like this
['name1=abc', 'name2=def', 'name3=ghi klm']
thus all quotes are considered and removed. Which function in python can take string of arguments and return such normalized list?
Update
Input string -> 'name1=abc name2=\'def\' name3="ghi klm"'
Output list -> ['name1=abc', 'name2=def', 'name3=ghi klm']
To split arguments in the same way as the shell, you can use
shlex.split():