[Tutor] request to run program on a Linux machine

Nick Lunt nick at javacat.f2s.com
Mon Feb 16 14:00:11 EST 2004


Hi Gregor,

very cool. Im a complete python beginner so I'll use your code as a
tutorial ;).

Anyway, I just ran it on Linux with python on a 700Mhz pc with 256Mb RAM
and there's no performance issues at all.

Im running python 2.3-3mdk with Tkinter 2.3-3mdk .

I put the speed down to 1 and quit the program while a disc was moving
and got the following error in the console:

$ ./hanoi.py 
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__
    return self.func(*args)
  File "./hanoi.py", line 216, in step
    if self.hEngine.step():
  File "./hanoi.py", line 127, in step
    self.HG.next()
  File "./hanoi.py", line 70, in hanoi
    for x in self.hanoi(n-1, src, temp, dest): yield None
  File "./hanoi.py", line 70, in hanoi
    for x in self.hanoi(n-1, src, temp, dest): yield None
  File "./hanoi.py", line 70, in hanoi
    for x in self.hanoi(n-1, src, temp, dest): yield None
  File "./hanoi.py", line 71, in hanoi
    yield self.move(src, dest)
  File "./hanoi.py", line 84, in move
    disc.move_to(x2,y2, self.speed)
  File "./hanoi.py", line 30, in move_to
    self.cv.move(self.item,dx,dy)
  File "/usr/lib/python2.3/lib-tk/Tkinter.py", line 2162, in move
    self.tk.call((self._w, 'move') + args)
TclError: invalid command name ".1078258988"
$

Cheers
Nick.



On Mon, 16 Feb 2004 18:52:29 +0100 Gregor Lingl <glingl at aon.at> wrote:

> Hi!
> 
> At the moment I unfortunately don't have a computer running
> Linux at hand, so ...
> 
> ... is there anybody out there using a machine running
> Python 2.3 with Tkinter under Linux, who is willing
> to run the attached program and give me feedback concerning
> two questions:
> 
> (1) Does the program run smoothly
> 
> (2) Does it terminate without error-messages (TclError)
> when the window is closed while the animation is running
> (i. e. while a disc is moving).
> This can be seen e.g. when you run it from within IDLE or
> from the commandline of some console window ...
> 
> Many thanks in advance
> Gregor
> 
> P.S. A second posting concerning this Hanoi program,
> concerning some remarks on the problem mentioned above
> will follow.
> 
> 



More information about the Tutor mailing list