def shell_escape(string):
 return re.sub('([^A-Za-z0-9_])', '\\\\\\1', string)

def shell_escape ( string ) : return re . sub ( '([^A-Za-z0-9_])' , '\\\\\\1' , string )
quote meta-characters in the args for the unix shell .