so ich wollt mir so aus guter laune mal ne Uhr basteln
Quellcode:
Code: Alles auswählen
#! /usr/local/bin/python
import time
from string import split
from Tkinter import *
def aktual():
date=split(time.ctime(time.time()))
lab["text"]='%s'%date[3]
date=split(time.ctime(time.time()))
hf=Tk()
zeit='%s'%date[3]
lab=Label(hf,text='%s'%date[3])
lab.pack()
but=Button(hf,text='refresh',command=aktual)
but.pack()
hf.mainloop()
momentan funzt das mit dem refresh-button aber das is ja nich das ware
ich würde gerne mal wissen wie man das machen kann
danke im vorraus
Edit (Leonidas): Code in Python-Tags gesetzt und verschoben.