add empty directory using zipfile?

JanC usenet_spam at janc.invalid
Thu Jun 26 06:31:37 CEST 2003

Tung Wai Yip <tungwaiyip at> schreef:

> Can I add empty directory using zipfile? When I try to add a directory
> it complains that it is not a file.

ZIP files can't contain directories, only files and the paths to those 
files.  A workaround might be to put an empty file in the directory.


"Be strict when sending and tolerant when receiving."
RFC 1958 - Architectural Principles of the Internet - section 3.9

More information about the Python-list mailing list