Ejemplo n.º 1
0
def readfilename(match):
    """Returns the filename from the match object resulting from textedit_match."""
    fname = match.group(1)
    lat1 = fname.encode('latin1')
    try:
        lat1 = percentcoding.decode(lat1)
    except ValueError:
        pass
    try:
        fname = lat1.decode(sys.getfilesystemencoding())
    except UnicodeError:
        pass
    return fname
Ejemplo n.º 2
0
def readfilename(match):
    """Return the filename from the match object resulting from textedit_match."""
    fname = match.group(1)
    lat1 = fname.encode('latin1')
    try:
        lat1 = percentcoding.decode(lat1)
    except ValueError:
        pass
    try:
        fname = lat1.decode(sys.getfilesystemencoding())
    except UnicodeError:
        pass
    # normalize path (although this might change a path if it contains
    # symlinks followed by '/../' !
    fname = util.normpath(fname)
    return fname
Ejemplo n.º 3
0
def readfilename(match):
    """Returns the filename from the match object resulting from textedit_match."""
    fname = match.group(1)
    lat1 = fname.encode('latin1')
    try:
        lat1 = percentcoding.decode(lat1)
    except ValueError:
        pass
    try:
        fname = lat1.decode(sys.getfilesystemencoding())
    except UnicodeError:
        pass
    # normalize path (although this might change a path if it contains
    # symlinks followed by '/../' !
    fname = util.normpath(fname)
    return fname