On 11/8/2014 3:31 PM, Akira Li wrote:
Terry Reedy tjre...@udel.edu writes:
On my Win7 machine, your complicated code is much worse as it causes
the window to jump about every half second
After cutting and pasting again, I do not see the jumps. I do not have
the code I ran before to
ast nom...@invalid.com writes:
Ok, thx, it works now with:
import tkinter
fen = tkinter.Tk()
x=0
def moveW():
global x
fen.geometry(200x200+%d+10 % x)
x = x + 10
if (x 1200):
fen.after(50, moveW)
moveW()
In general, to avoid the start time drift [1], you
On 11/8/2014 11:35 AM, Akira Li wrote:
ast nom...@invalid.com writes:
Ok, thx, it works now with:
import tkinter
fen = tkinter.Tk()
x=0
def moveW():
global x
fen.geometry(200x200+%d+10 % x)
x = x + 10
if (x 1200):
fen.after(50, moveW)
moveW()
In general, to
a window on the screen, the
difference doesn't matter though if it is a GUI clock then you should
not ignore it otherwise it will be wrong by a minute in a couple of
days.
function, *args) # schedule the next call
function(*args)
def move(delta_x, max_x, width=200, x
Hi
Why the following program doesn't work ?
for x in range(0, 100, 10):
fen.geometry(200x200+%d+10 % x)
time.sleep(0.5)
where fen is a window (fen = Tk())
The fen window goes from it's initial location to the last one
but we dont see all the intermediate steps
thx
--
On Thu, Nov 6, 2014 at 7:32 PM, ast nom...@invalid.com wrote:
The fen window goes from it's initial location to the last one
but we dont see all the intermediate steps
You usually don't want to use time.sleep() in a GUI program. Try doing
the same thing, but with an event loop delay call
ast wrote:
Why the following program doesn't work ?
for x in range(0, 100, 10):
fen.geometry(200x200+%d+10 % x)
time.sleep(0.5)
where fen is a window (fen = Tk())
The fen window goes from it's initial location to the last one
but we dont see all the intermediate steps
Chris Angelico ros...@gmail.com a écrit dans le message de
news:mailman.15536.1415264262.18130.python-l...@python.org...
You usually don't want to use time.sleep() in a GUI program. Try doing
the same thing, but with an event loop delay call instead; often, the
display won't update until you
On 11/6/2014 3:57 AM, Chris Angelico wrote:
On Thu, Nov 6, 2014 at 7:32 PM, ast nom...@invalid.com wrote:
The fen window goes from it's initial location to the last one
but we dont see all the intermediate steps
You usually don't want to use time.sleep() in a GUI program. Try doing
the same