newbie : ftp auto-uncompress?
sandipan at vsnl.com
Fri May 18 23:13:12 EDT 2001
AFAIK, the server did it. Your ftp object received uncompressed text.
----- Original Message -----
From: "Buster Brown" <buster2642 at MailAndNews.com>
To: <python-list at python.org>
Sent: Saturday, May 19, 2001 7:56 AM
Subject: newbie : ftp auto-uncompress?
> I created a simple ftp download script (run on Linux) :
> from ftplib import FTP
> File = open('fileName', 'w')
> ftp.retrbinary('RETR ' + 'fileName', File.write, 1024)
> The script did what I wanted. However, at the download site the filename
> actually 'fileName.Z'. The file saved in my local directory is
> to text, as I want. What function did the Unix 'uncompress', File.write?
> Is it due to my choice of 'fileName' and not 'fileName.Z' in the 2 lines?
> I searched the Python documentation with no luck. Any pointers/links to
> documentation about this much appreciated.
More information about the Python-list