Re: Using zipfile to create a zip file with directories and files

2020-03-07 Thread Michael Torrie
On 3/7/20 1:08 AM, mus...@posteo.org wrote: > On Fri, 6 Mar 2020 20:06:40 -0700 > Michael Torrie wrote: > >> The documentation talks about writing files from >> disk, but I'm interested in creating these files from within Python >> directly in the zip archive. > > But you have seen writestr(), hav

Re: Using zipfile to create a zip file with directories and files

2020-03-07 Thread musbur
On Fri, 6 Mar 2020 20:06:40 -0700 Michael Torrie wrote: > The documentation talks about writing files from > disk, but I'm interested in creating these files from within Python > directly in the zip archive. But you have seen writestr(), haven't you? ZipFile.writestr(zinfo_or_arcname, data, com

Using zipfile to create a zip file with directories and files inside

2020-03-07 Thread Michael Torrie
I am trying to do something very simple but having no success in finding out how to do it. I just want to use the Python zipfile module to create a zip file with a specific directory structure and create and write to files inside those subdirectories (not files already on disk). The documentati

Re: Using zipfile to create a zip file with directories and files inside those directories

2020-03-07 Thread Michael Torrie
On 3/7/20 1:08 AM, mus...@posteo.org wrote: > On Fri, 6 Mar 2020 20:06:40 -0700 > Michael Torrie wrote: > >> The documentation talks about writing files from >> disk, but I'm interested in creating these files from within Python >> directly in the zip archive. > > But you have seen writestr(), h

Re: Using zipfile to create a zip file with directories and files inside those directories

2020-03-07 Thread musbur
On Fri, 6 Mar 2020 20:06:40 -0700 Michael Torrie wrote: > The documentation talks about writing files from > disk, but I'm interested in creating these files from within Python > directly in the zip archive. But you have seen writestr(), haven't you? ZipFile.writestr(zinfo_or_arcname, data, com

Using zipfile to create a zip file with directories and files inside those directories

2020-03-06 Thread Michael Torrie
I am trying to do something very simple but having no success in finding out how to do it. I just want to use the Python zipfile module to create a zip file with a specific directory structure and create and write to files inside those subdirectories (not files already on disk). The documentation