Exemplo n.º 1
0
def load_path(filename):
    "Load a font file, searching along the Python path."
    for dir in sys.path:
        if Image.isDirectory(dir):
            try:
                return load(os.path.join(dir, filename))
            except IOError:
                pass
    raise IOError("cannot find font file")
Exemplo n.º 2
0
def load_path(filename):
    "Load a font file, searching along the Python path."
    for dir in sys.path:
        if Image.isDirectory(dir):
            try:
                return load(os.path.join(dir, filename))
            except IOError:
                pass
    raise IOError("cannot find font file")