NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Everything Else » Python programming help
June 21, 2011 by grombletromble |
Hello all, I'm very new to Python but I wanted to try it out on a project I've been planning for a while - I want to create a very basic sunrise alarm clock that essentially starts as a black screen and then gets progressively lighter until it is at full brightness at which point a sound would play if it had not already woken up. Now I've been able to get a fullscreen colour, but I can't get it to refresh to a new colour :( Would any Python buffs be able to tell me where I'm going wrong in refreshing the panel? Code: !/usr/bin/pythonkeyevent.pyimport wx,time a = 0 class KeyEvent(wx.Frame): def init(self, parent, id, title): wx.Frame.init(self, parent, id, title)
app = wx.App() KeyEvent(None, -1, 'keyevent.py') app.MainLoop() |
---|---|
June 21, 2011 by missle3944 |
Hi grombletromble, I too am working on a graphical program in python but I reccommend downloading and installing pygame. The nerdkits guys use it in alot of their projects that involve graphs. It is really usable and I got the basics of it in about an hour just of youtube. Here is the code for putting a white backround in python with pygame:
-missle3944 |
Please log in to post a reply.
Did you know that you can build a circuit to convert the "dit" and "dah" of Morse code back into letters automatically? Learn more...
|