def esc_quotes(strng):

    return strng.replace('"','\\"').replace("'","\\'")
Return the input string with single and double quotes escaped out
dataset/ETHPy150Open ipython/ipython-py3k/IPython/utils/text.py/esc_quotes