[Zope] csv import continued
David Siedband
david at calteg.org
Mon Aug 9 12:43:25 EDT 2004
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
More information about the Zope
mailing list