I cannot get the Chapter 4 media module examples to work with Python 2.6(.2) on Windows (XP, Vista). I used PyGraphics-2.0.win32.exe from the install directory in the book’s code file (gwpy-code.zip) and followed the instructions in that directory. Wing IDE, PIL, pygame, and numpy installation files: *wingide-101-3.1.8-1.exe *PIL-1.1.6.win32-py2.6.exe *pygame-1.8.1release.win32-py2.6.msi *numpy-1.3.0-win32-superpack-python2.6.exe
The examples work as expected with Python 2.5 and applicable versions of PIL, pygame, and numpy.
media.show() raises a Tkinter exception. Using
media.show_external() works, but only after setting the environment
TEMP variable to the current directory. Finally, the cropping exercise does not actually crop the image, although
get_height() return the new values.
Has anyone else experienced anything similar, or have I missed an obvious step somewhere? I notice that the pygame download pages says “(python2.5.4 is the best python on windows at the moment)” and wonder if that has something to with the problems…
Oh, and by the way, ‘pic207.jpg’ is not in the code collection of files, although easy enough to create from the PDF version of the book.