Browsed by
Month: December 2010

CamDDR

CamDDR

8 years ago a buddy introduced me to DDR. I went from ashamed, to bemused to loving it within about a year and I got pretty good. I full-combod Era at expert a couple of time.

With all the Kinect hype, I’ve been thinking it would be an excellent device for a virtual DDR pad. Unfortunately I don’t have a Kinect – but I do have a crappy cheap webcam and so CamDDR was born.

You can find instructions and download the beta here: CamDDR

I’m not out of ideas yet and I think I know how to make version 0.3 deal with back steps a whole lot better, so it will be interesting to see where this goes. If I can pass Era on the second level of difficulty I’ll be happy.

Py2EXE, PIL and ImageFont Error

Py2EXE, PIL and ImageFont Error

After using Py2EXE to generate a distributable binary from a project that used the Python Imaging Library (PIL) I got an error like this:

File “PIL\ImageFont.pyc”, line —, in load_path IOError: cannot find font file

A quick google yields this page: http://www.py2exe.org/index.cgi/PILAndFontfiles

Unfortunately dropping the files into the Dist directory wasn’t enough – when cycling through path directories to find the file it searches for …/dist/library.zip rather than simply /dist.

The fix is simple, edit your ImageFont.py file and in the load_path(filename) function, change:

def load_path(filename):
"Load a font file, searching along the Python path."
for dir in sys.path:
if Image.isDirectory(dir):

to:

def load_path(filename):
"Load a font file, searching along the Python path."
for dir in sys.path:
dir = os.path.dirname(dir)
if Image.isDirectory(dir):

This worked for me.