'Quote s if it needs quoting for the commandline.
Note we don\'t use shlex.quote because that quotes a lot of shell
metachars we don\'t need to have quoted.'

def _quote(self, s):

    if (not s):
        return "''"
    elif any(((c in s) for c in "    ' DCTB \n\\")):
        return (("'" + s.replace("'", '\'"\'"\'')) + "'")
    else:
        return s
