def escape_windows_cmd_string(s):
for c in '<STR_LIT>':<EOL><INDENT>s = s.replace(c, '<STR_LIT>' + c)<EOL><DEDENT>s = s.replace('<STR_LIT>', '<STR_LIT>')<EOL>return s<EOL>
Returns a string that is usable by the Windows cmd.exe.
    The escaping is based on details here and emperical testing:
    http://www.robvanderwoude.com/escapechars.php