9 Aug
2004
9 Aug
'04
4:43 p.m.
How could I adapt this code to get a CSV file from a remote URI instead of the request?
Now i have an iterable file for the csv module in this code:
def students(self,REQUEST): import csv f=REQUEST.form["students.csv"] from cStringIO import StringIO filebody=StringIO(f.read()) reader = csv.DictReader(filebody,("firsname","surname", "year","form","gender")) for row in reader: self.writestudents(row)
TIA, -- David