On Tue, Aug 23, 2011 at 2:57 PM, Alan Gauld <alan.ga...@btinternet.com>wrote:
> On 23/08/11 19:23, James Reynolds wrote: > >> I tried that already. >> >> that's only to set the default password to read the zip, not to set a >> pasword (wording is misleading I think) >> >> > I'm confused. > > Which password are you thinking of? > > Is it at the OS level to prevent access to the file > - in which case the fact that its a zipfile is immaterial. > Or is it the zipfile's own password? In which case what > is different from the "default password to read the file"? > > > What exactly are you trying to achieve? > > > -- > Alan G > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > ______________________________**_________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/**mailman/listinfo/tutor<http://mail.python.org/mailman/listinfo/tutor> > (from earlier) I need to password protect a zip file I am creating from within python. I would rather not have a user open the zip and set the password manually. I'm trying the 7-zip solution, but I can't get past this error: WindowsError: [Error 2] The system cannot find the file specified The line it fails at is here: z = subprocess.call(['7z', 'a', '1234', '-y', name + '.zip'] + self.file_locs) (from now) oddly enough, when I open up a python shell, i can run the above just fine and it creates a .zip file. But when I run it from eclipse, the exact thing, I get the error.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor