[triangle-zpug] can't find font problem

Joseph Mack NA3T jmack at wm7d.net
Sun Mar 30 01:42:01 UTC 2008

I have a font which I can find with the full pathname

#-----code starts here
from math import sqrt
import os, sys
from PIL import Image, ImageDraw, ImageFont

print sys.path
#-------code ends here

I get an error with any variation of the font filename where 
I left python handle the python path, including just the 
bare filename.

Here's python path from the code


the error is

Traceback (most recent call last):
   File "./pi_numerical_integration_diagram.py", line 55, in ?
     label_font = ImageFont.load("PIL/courR18.pil")
   File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", 
line 180, in load
   File "/usr/lib/python2.4/site-packages/PIL/ImageFont.py", 
line 67, in _load_pilfont
     file = open(filename, "rb")
IOError: [Errno 2] No such file or directory: 

I've got code that runs, but I'd like to get my python 
path working. What am I doing wrong?

Thanks Joe

Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!

More information about the triangle-zpug mailing list