Example #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")
Example #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")