parameters: (file)
return_statement: return "'" + file.replace("'", "'\"'\"'") + "'"
docstring: Return a shell-escaped version of the file string.
docstring_summary: Return a shell-escaped version of the file string.
docstring_tokens: Return a shell - escaped version of the file string .
function: def quote(file):
      """Return a shell-escaped version of the file string."""
      for c in file:
          if c not in _safechars:
              break
      else:
          if not file:
              return "''"
          return file
      # use single quotes, and put single quotes into double quotes
      # the string $'b is then quoted as '$'"'"'b'
      return "'" + file.replace("'", "'\"'\"'") + "'"
function_tokens: def quote ( file ) : for c in file : if c not in _safechars : break else : if not file : return "''" return file # use single quotes, and put single quotes into double quotes # the string $'b is then quoted as '$'"'"'b' return "'" + file . replace ( "'" , "'\"'\"'" ) + "'"