[Image-SIG] ImageFont.load_path() searching patch

Richard Jones richard.jones@fulcrum.com.au
Fri, 19 Mar 1999 15:42:26 +1100


[Richard Jones]
>    Here's a simple patch to ImageFont.load_path() that makes it search the 
> directories specified by the ".pth" files in the Python search path. I'm not 
> sure if I implemented the searching exactly as the interpreter does it - but 
> it works for me. YMMV.

   Here's a "better" snippet of code to find those pesky .pth files. I've added 
this to my application now instead of ImageFont - I figure it's probably better 
this way...

import site
if sys.path[0] == '': path = '.'
else: path = sys.path[0]
site.addsitedir(path)



       Richard