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], row[6]
it's ok,
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
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):
(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' object is not callable
i don't know why??
--
http://mail.python.org/mailman/listinfo/python-list