Python 2.6, Ch. 4 media module examples

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.

Specifically, 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_width() and 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.

“If you want to use the image manipulation examples from the book, you should use Python 2.5 because some of the libraries that our code relies on have not yet been updated to work with Python 2.6.”
Practical Programming: installation instructions

This is Paul, one of the authors. Your initial post prompted us to take a close look; we’ve had some success with Python 2.6 on Windows XP but not on Vista or 7 and some difficulties on Mac OS X, and the whole dependency mess made us update the instructions to focus on Python 2.5. Our apologies for the bad instructions in the first place.

I just bought this book and on Mac OSX it comes with 2.6.1 on Snow Leopard. I tried to download the python-2.5-macosx.dmg and installed the MacPython.mpkg but it still did not override the 2.6.1 version. I installed all of the packages from your Install Instructions however when I am in iPython this is what I get

Paul, I’m using your textbook for an introductory programing class I’m taking, and the link you post above (which is also in the book, page 46) doesn’t work. I get a 503 error. So I can’t proceed with my homework because I can’t load the media module. Can you please provide an updated link to a Windows 64-bit version of PyGraphics?