Artima Weblogs |
Guido van van Rossum's Weblog |
Discuss |
Email |
Print |
Bloggers |
Previous |
Next
|
Sponsored Link •
|
Summary
At OSCON I rewrote one of the earliest Python graphics demos I ever did, this time in Tkinter -- a colorful clock. Miguel de Icaza thinks it's cool!
Advertisement
|
Some time in the '80s I saw a very cool wall clock. It has two transparent discs attached to the hands, where each disc has nine gradations of a primary color applied to it. The background has a similar, fixed pattern using the third primary color. The result is a clock that looks different every minute! Hard to describe properly; you have to see it. (And you will, hold on.)
My parents bought me that clock as a birthday present. The front says "M Clock" and "Rob Juda". (I've seen other, similar clocks by the same designer.) After having moved half a dozen times, it's still hanging on my kitchen wall telling the time and getting curious looks from visitors.
In the early '90s I did a software implementation of that clock in Python, using the SGI GL bindings that we had just created at CWI. It made it into the Python distribution as a demo, but was eventually withdrawn because GL support died and I didn't have the time to port it to OpenGL. (It's still in the CVS Attic.)
A few weeks I received an email from the designer, Mr. Juda (a compatriot of mine), asking if the software was still available. There is a clock museum in the Netherlands (Schoonhoven) which has all of Mr. Juda's designs on display, and he thought that the museum would be interested in the software version, if it was still available (and ran on Windows). He told me some of the history of the clock -- about 100,000 clocks were produced and sold from '84 through '94. It was hard to sell the clock because people wouldn't realize that three totally different looking clocks were really the same clock at different times!
I promised Mr. Juda that I would consider reviving the software, and here it is: mclock2.py. It runs on Windows and Unix as long as you have a recent version of Python with Tkinter enabled. (The most recent Windows installer of Python is downloadable from python.org/2.4.1/.) Tip for Windows users: rename the file to "mclock2.pyw" to suppress the text console.
PS: It would be cool if someone did an Xscreensaver version of this...
PPSS: The first version I posted had the color gradations reversed. I've fixed that, made the hands look more like those on the original, and removed the right-click-to-zoom feature on Unix (it was using a Tk feature that only works on Windows). URL is unchanged.
Have an opinion? Readers have already posted 9 comments about this weblog entry. Why not add yours?
If you'd like to be notified whenever Guido van van Rossum adds a new entry to his weblog, subscribe to his RSS feed.
Guido van Rossum is the creator of Python, one of the major programming languages on and off the web. The Python community refers to him as the BDFL (Benevolent Dictator For Life), a title straight from a Monty Python skit. He moved from the Netherlands to the USA in 1995, where he met his wife. Until July 2003 they lived in the northern Virginia suburbs of Washington, DC with their son Orlijn, who was born in 2001. They then moved to Silicon Valley where Guido now works for Google (spending 50% of his time on Python!). |
Sponsored Links
|