Multimedia in Python
When adding images and sound for multimedia programming in Python, you need to use Python version 2.5 or 2.6 to make it easy for you. This short guide uses version 2.6.2 and Python imaging library (PIL).
I had difficulies getting PIL to work on Mac but later found out that it works farily well on Python version 2.5. So these examples runs on Windows XP with sound, and on Mac OS X without sound. Feel free to try on Mac or Linux as well.
Click the link below to get to the download page for the open source project PIL. Again use Windows XP for simplicity.
Try out these programs to get started using images and sound in your python programming. See screenshots below!
Source code will be available when grades are set on the submitted assignments. Release of source code at September 10th 2009.
Guess my number game
Lab 3: Guess my number game in swedish. Pick a number between 1 and 100 and get a colorful feedback representing distance from correct number. Lighter blue is closer to goal than darker. Screenshot in green represents a correct guess.
Information Architecture Toolbox
Lab 4: Information Architecture toolbox. Shows nine different images and text to explain tools used by information architects.
Complementing the information is a speach synthesizes who “reads” the heading. Information i represented in a closed graph, which means there is no beginning or end pressing the Previous or Next buttons.
Count with Hanna
A game for my four-year old daughter who should guess whether the number of wild strawberries is represented by the number or not. Feedback is only in sound with .wav files like “applause” and “ohno” sounds.
Count with Alexandra
A screenshot of the program “Räkna med Alexandra”. Game idea is tha same as the above but harder for my six-year old daughter. Pressing one of the buttons for addition, subtraction, times or division - she has to type the correct number in the textbox. Pushing the “Rätta!” button gives feedback in both sound and color of textbox.
The nine boxes below the game board represent the last nine guess result implemented using the abstract datatype queue.