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 "ttk::ThemeCha

Re: Strang thing in tkinter, and pdb too?

2017-06-11 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 -- htt

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 messa

Strang thing in tkinter, and pdb too?

2017-06-11 Thread jfong
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 message in the box, but everything else is fine. The GUI

Re: strang thing:

2011-09-12 Thread Chris Angelico
On Tue, Sep 13, 2011 at 1:28 PM, Steven D'Aprano 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 is why every good programm

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 cal

回复: strang thing:

2011-09-12 Thread 守株待兔
t;Chris Angelico"; 发送时间: 2011年9月6日(星期二) 下午4:22 收件人: "python-list"; 主题: Re: strang thing: 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 th

回复: strang thing:

2011-09-12 Thread 守株待兔
t;Chris Angelico"; 发送时间: 2011年9月6日(星期二) 下午4:22 收件人: "python-list"; 主题: Re: strang thing: 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 th

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: 's

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

strang thing:

2011-09-06 Thread 守株待兔
i found stange thing that i can't solve import os import csv for name in os.listdir('/tmp/quote/'): filename='/tmp/quote/'+name file = open(filename,'r') file.readline() for row in csv.reader(file): print row[0], row[1], row[2], row[3],row[4], row[5], r