[Tutor] Now where do I go from here in this program??????
Charles Gruschow
gruschow2@hotmail.com
Wed, 07 Mar 2001 14:24:19 -0600
I want to repeat/refresh App so I get a continually running clock. Instead
of one instance. This program so far works good but it only gives one
instance in time.
Charles Gruschow
gruschow2@hotmail.com
#!/usr/local/bin/python
from Tkinter import *
from time import *
class App:
def __init__(self, master):
frame=Frame(master)
frame.pack()
self.button = Button(frame,text="Die
Button",fg="red",command=frame.quit)
self.button.pack()
w=StringVar()
self.label=Label(frame,textvariable=w)
self.label.pack()
def givetime():
a=localtime(time())[3:6]
b=a[0],chr(58),a[1],chr(58),a[2]
c=str(b[0])+str(b[1])+str(b[2])+str(b[3])+str(b[4])
d='Time is '
e=d+c
return e
w.set(givetime())
root=Tk()
app=App(root)
root.mainloop()
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com