Re: Strang thing in tkinter, and pdb too?

2017-06-12 Thread Christian Gollwitzer
Am 12.06.17 um 06:03 schrieb Terry Reedy: On 6/11/2017 10:06 PM, jf...@ms4.hinet.net wrote: D:\Temp\widget-tour-py3>python canvasruler.py can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure

Re: Strang thing in tkinter, and pdb too?

2017-06-12 Thread jfong
Terry Reedy於 2017/06/12 UTC+8 12:04:18PM wrote: > Right. I got this with IDLE tests before using ttk. Good luck tracing > this to its origin. A little progress. If I remove temp.destroy() at line 34 then that message is gone. hmm...trying to find another way of doing it:-) --Jach Fong --

Re: Strang thing in tkinter, and pdb too?

2017-06-11 Thread Terry Reedy
On 6/11/2017 10:06 PM, jf...@ms4.hinet.net wrote: I had donwload wdiget-tour-py3.tar.gz examples from this site: http://www.hullsvle.ch/moodle/mod/resource/view.php?id=6697 and run one of its scripts canvasruler.py, I get stange result. First, when I run it in the cmd box, although I get a

Re: strang thing:

2011-09-12 Thread Steven D'Aprano
(I sent this reply a week ago, but it seems to have disappeared. So trying again.) On Tue, 6 Sep 2011 06:18 pm 守株待兔 wrote: when i  add    (date,open,high,low,close,vol,adjclose) = (row[0], row[1], row[2], row[3],row[4], row[5], row[6]) change the code into Here you define a new variable

Re: strang thing:

2011-09-12 Thread Chris Angelico
On Tue, Sep 13, 2011 at 1:28 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The best solution is to avoid using the name open, instead call it open_ (underscore at the end is the usual convention to avoid shadowing built-ins). Or open_value or any other appropriate name. This

Re: strang thing:

2011-09-06 Thread Chris Angelico
2011/9/6 守株待兔 1248283...@qq.com:     file = open(filename,'r') when i  add    (date,open,high,low,close,vol,adjclose) = (row[0], row[1], You're assigning to the name open, which is shadowing the built-in of the same name. The second time through the loop, you're not calling the usual open()

Re: strang thing:

2011-09-06 Thread Wolfgang Rohdewald
On Dienstag 06 September 2011, 守株待兔 wrote: (date,open,high,low,close,vol,adjclose) = (row[0], row[1], row[2], row[3],row[4], row[5], row[6]) print row[0], row[1], row[2], row[3],row[4], row[5], row[6] the wrong output is : file = open(filename,'r') TypeError: 'str'