def shquote(arg):
for c in '<STR_LIT:">', "<STR_LIT:'>", "<STR_LIT:\\>", "<STR_LIT:#>":<EOL><INDENT>if c in arg:<EOL><INDENT>return repr(arg)<EOL><DEDENT><DEDENT>if arg.split() != [arg]:<EOL><INDENT>return repr(arg)<EOL><DEDENT>return arg<EOL>
Quote an argument for later parsing by shlex.split()