On Mon, Nov 2, 2009 at 4:39 PM, sityee kong <sko...@gmail.com> wrote: <snip> > However for the ZIP file, let says the ZIP file contains only one member, >>>> archive.namelist() > ['CHAVI_MACS_SC_A__AUG_25_08_FinalReport_090812.csv'] > > I would like to open the csv file with folowwing command, > file=archive.open("CHAVI_MACS_SC_A__AUG_25_08_FinalReport_090812.csv","r") > But it turned out error, > > Traceback (most recent call last): > File "<stdin>", line 1, in ? > AttributeError: ZipFile instance has no attribute 'open'
ZipFile.open(name[, mode[, pwd]]) [...] New in version 2.6. Would your Python version happen to be pre-2.6? Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list