problem with gzip files

Dave Harrison dlharris at mail.usyd.edu.au
Thu Jul 19 13:19:42 EDT 2001


To the resident Python-eers,

I am writing a script which goes through and reads logfile, and since I want to read the archived ones as well I need to be able to open up the gzip'd ones as well.

However everytime I try to open up a gzip file I get the following error :

Traceback (most recent call last):
	File "./zipreader.py", line 3, in ?
		import gzip, os
	File "/usr/local/lib/python2.1/gzip.py", line 9, in ?
		import zlib
ImportError: No module named zlib

I then tried installed the zlib library, which went fine.  Except it hasn't solved my problem.

Is there something simple I am missing here ? Any advice ?

Thanks
Dave




More information about the Python-list mailing list