On Mon, Jun 7, 2010 at 11:22 AM, Baiju M <mba...@zeomega.com> wrote:

> On Mon, Jun 7, 2010 at 6:40 AM, murugadoss <murugadoss2...@gmail.com>
> wrote:
> > Hi,
> > Good Morning.
> >
> > 1.
> > This is regarding installing python in 64-bit linux pc. one of the issue,
> > which we were talking earlier. It was recommended to install python with
> > 32-bit gcc compiler in 64-bit m/c.
> > step:
> > while installing python in 64-bit m/c, try using
> > export CC='gcc -m32'
> > ./configure --prefix = "installing directory" ; make ; make install
> >
> > 2.
> > coming to extracting tarfile :
> > I am able to extract a *.tar file using tarfile.extractall( ) .The same
> when
> > i try extracting *.tar.gz,check tarfile.is_tarfile( ) returning false. On
> > debugging, i found in ../lib/tarfile.py + 1148 (open function) where it
> > checks the file type and returns the file attributes is failing. Exactly
> > telling " *return func(name, "r", fileobj)* " This line is failing or
> > returning none. This happens only in 64-bit linux m/c. It is working in
> > 32-bit linux and windows m/c.
> >
> > 3.on other Method,
> > i open the file using tarfile.open(*.tar.gz,"r:gz"). I am getting an
> error
> > as "ImportError: No module named zlib".
> >
> >>>import tarfile
> >>>tarfile.open("*.tar.gz","r:gz")
> > ImportError: No module named zlib
>
> You should have "zlib" development libraries installed before installing
> Python.
>
>
This is why your Python is unable to read tar.gz files. No other
mystery in this. I agree that the error message could be more
descriptive. In this case looks like the tarfile module is masking
the original error message which is a failure to import zlib module.


-- 
--Anand
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to