lib/matplotlib/backends/backend_ps.py
def quote_ps_string(s):
    "Quote dangerous characters of S for use in a PostScript string constant."
    s=s.replace("\\", "\\\\")
    s=s.replace("(", "\\(")
    s=s.replace(")", "\\)")
    s=s.replace("'", "\\251")
    s=s.replace("`", "\\301")
    s=re.sub(r"[^ -~\n]", lambda x: r"\%03o"%ord(x.group()), s)
    return s
Quote dangerous characters of S for use in a PostScript string constant.
Quote dangerous characters of S for use in a PostScript string constant.
Quote dangerous characters of S for use in a PostScript string constant .
def quote_ps_string(s):
    s=s.replace("\\", "\\\\")
    s=s.replace("(", "\\(")
    s=s.replace(")", "\\)")
    s=s.replace("'", "\\251")
    s=s.replace("`", "\\301")
    s=re.sub(r"[^ -~\n]", lambda x: r"\%03o"%ord(x.group()), s)
    return s
def quote_ps_string ( s ) : s = s . replace ( "\\" , "\\\\" ) s = s . replace ( "(" , "\\(" ) s = s . replace ( ")" , "\\)" ) s = s . replace ( "'" , "\\251" ) s = s . replace ( "`" , "\\301" ) s = re . sub ( r"[^ -~\n]" , lambda x : r"\%03o" % ord ( x . group ( ) ) , s ) return s
Quote dangerous characters of S for use in a PostScript string constant.
Quote dangerous characters of S for use in a PostScript string constant .
"Quote dangerous characters of S for use in a PostScript string constant."
s