i change  open into open1,it's ok now<br>import os<br>import  csv<br><br>for  name  in   os.listdir('/tmp/quote/'):<br>    filename='/tmp/quote/'+name<br>    file = open(filename,'r')<br>    file.readline()     <br>    for row in csv.reader(file):<br>            (date,open1,high,low,close,vol,adjclose) = (row[0], row[1], row[2], row[3],row[4], row[5], row[6])<br>            print   row[0], row[1], row[2], row[3],row[4], row[5], row[6]<br><br><br>but i want "open"  to be my data field,not  open1  to be my field ,<br>how can i do?<br><div><tincludetail><div> </div><div> </div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>发件人:</b> "Chris Angelico"<rosuav@gmail.com>;</div><div><b>发送时间:</b> 2011年9月6日(星期二) 下午4:22</div><div><b>收件人:</b> "python-list"<python-list@python.org>; <wbr></div><div></div><div><b>主题:</b> Re: strang thing:</div></div><div> </div>2011/9/6 守株待兔 <1248283536@qq.com>:<br>>     file = open(filename,'r')<br><br>> when i  add    (date,open,high,low,close,vol,adjclose) = (row[0], row[1],<br><br>You're assigning to the name "open", which is shadowing the built-in<br>of the same name. The second time through the loop, you're not calling<br>the usual open() function, you're trying to call your string. That's<br>what your error is telling you.<br><br>Hope that helps!<br><br>ChrisA<br>-- <br>http://mail.python.org/mailman/listinfo/python-list<br></div></tincludetail></div>