Linx <>Windows
Verfasst: Mittwoch 14. September 2005, 18:03
Hallo !
Kann mir mal bitte einer sagen, warum sich dieser Code unter Windows sich Problemlos ausführen lässt und unter Linux nicht.
WinXP Profi Editor Standart
Linux Ubuntu Editor Scite
schonmal Dank.
Python Fan
Kann mir mal bitte einer sagen, warum sich dieser Code unter Windows sich Problemlos ausführen lässt und unter Linux nicht.
Code: Alles auswählen
#!/usr/bin/python
from Tkinter import Tk, PhotoImage, Label
from random import randrange
usingIDLE = 1
def zufallspixel():
while running:
for i in range(20):
pixel = (randrange(300), randrange(300))
bild.put('black',pixel)
root.update()
def start(event):
global running
running=1
zufallspixel()
def stop(event):
global running
running=0
root=Tk()
bild=PhotoImage(width=300, height=300)
anzeige=Label(root, image=bild, bg='white')
anzeige.pack()
root.bind('<Button-1>',start) #Maustaste Links
root.bind('<Button-3>',stop) #Maustaste Rechts
if not usingIDLE:
root.mainloop()
Linux Ubuntu Editor Scite
schonmal Dank.
Python Fan