[linux-audio-user] a live performance timer
Erik de Castro Lopo
erikd-lad at mega-nerd.com
Wed Oct 20 10:28:29 EDT 2004
On Wed, 20 Oct 2004 14:47:02 +0100
"Dave Griffiths" <dave at pawfal.org> wrote:
> Hi all,
>
> A timer in a window that counts up in seconds, clicking on it resets the time
> back to 0. for seeing how much time you've got left during a live gig...
Cute! Here's a small improvement:
> self.widget=Button(master,text="0:0",font=("Courier",50,"bold"),relief=FLAT,command=self.reset)
Replace "0:0" with " 0:00"
and this:
> self.widget.config(text=str(thistime/60)+":"+str(thistime%60))
with
self.widget.config(text="%2d:%02d" % (thistime / 60, thistime % 60))
Erik
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"It's far too easy to make fun of Microsoft products, but it takes a
real man to make them work, and a god to make them do anything useful"
-- Anonymous
--
+-----------------------------------------------------------+
Erik de Castro Lopo nospam at mega-nerd.com (Yes it's valid)
+-----------------------------------------------------------+
"Windows was created to keep stupid people away from UNIX."
-- Tom Christiansen
More information about the Linux-audio-user
mailing list