def EscapeShellArgument(s):
 return (("'" + s.replace("'", "'\\''")) + "'")

def EscapeShellArgument ( s ) : return ( ( "'" + s . replace ( "'" , "'\\''" ) ) + "'" )
quotes an argument so that it will be interpreted literally by a posix shell .