This is the first large-scale game I've done with python (2.x with Pygame), and Pac-Man was an appropriate candidate as one of my all-time favorites. Mazes (w/ colors) are read from external text files, which are designed to be easily edited (with the Maze Editor), fruit bounces in and out of the passageways, and the ghosts use a variation of the A* pathfinding algorithm to chase pac-man and find their way back to the ghost box. The game is meant to be easily expandable or modifiable. I hope you enjoy it! Feel free to poke around the source (hopefully it's readable enough).
Current version includes cross-platform, high score, and joystick support, courtesy of Andy Sommerville
License: You are free to modify and redistribute this code to your heart's content. I only ask that you don't charge for it and would also appreciate a credit of some kind (or link to this webpage).