def escape_filename(filename):
    'Surround filename in "" and escape " in the filename\n    '
    filename = filename.replace('"', '\\"').replace('`', '\\`')
    filename = ('"%s"' % filename)
    return filename
Surround filename in "" and escape " in the filename
def escape_filename(filename):
    '\n    '
    filename = filename.replace('"', '\\"').replace('`', '\\`')
    filename = ('"%s"' % filename)
    return filename