Bulba! wrote:
tried to  read file, zip it, and put in the target directory....

It works nice, except the zipfile created contains the directory path
of the source file -- which I do NOT want to recreate.
Look into the two-argument form of the write command:

    import zipfile
    archive = zipfile.ZipFile('box.zip', 'w', zipfile.ZIP_DEFLATED)
    archive.write('source/somewhere/one.txt', 'name.txt')
    archive.write('two.txt', 'another.txt')
    archive.close()

--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to