Hi all, yes, im using python 2.4. I would like to know how does python 2.4 work for my case w/o the new added feature in 2.6? Do you guys know?
thanks! On Mon, Nov 2, 2009 at 5:02 PM, Tim Chase <python.l...@tim.thechases.com>wrote: > 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? >> > > FWIW, you can use the 2.6 zipfile.py as far back as 2.4 by just copying it > into your project directory. I had a similar issue in 2.4 (wanted the > iterator provided by 2.6's open() call) and Gabriel suggested trying to just > copy in the 2.6 version into my project directory. Worked for me(tm). > > -tkc > > >
-- http://mail.python.org/mailman/listinfo/python-list