|
There is no zip command in as such in windows. You can
install www.7-zip.com software and trying
withh command command line interface as belodw
zip_command = "7z -a %s %s" % (target,
''.join(source))
If you like to zip files using python:
import zipfile
#create a zip
zipf = zipfile.ZipFile('myzipfile.zip','w',zipfile.ZIP_DEFLATED) for path,dirs,files in os.walk('Directory_To_Zip'): for filen in files: filen = os.path.join(path,filen) print filen,'...' zipf.write(filen) print 'done' zipf.close() --
Senthil
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ramakrishnan, Shashikanth Sent: Thursday, July 13, 2006 3:08 AM To: [email protected] Subject: [Tutor] Hi, need help on zip commands for windows Hi, I have just started using Python and
would appreciate if somebody could help me out on zip
commands. I am using C H Swaroop’s book “A byte of python” as my beginners
guide. One example states to
use >>>zip_command = "zip -qr '%s' %s" %
(target, ' '.join(source)) for zipping the target and
source. However, “zip_command” as I
understand is for Linux. What would be the quivalent command
for windows( I am using IDLE 1.1.3, Python version
2.4.3) Really appreciate your
help. Thanks, Shashi. |
_______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
