On Tue, Aug 23, 2011 at 4:11 PM, James Reynolds <eire1...@gmail.com> wrote:
> > > On Tue, Aug 23, 2011 at 3:49 PM, Emile van Sebille <em...@fenx.com> wrote: > >> On 8/23/2011 12:31 PM James Reynolds said... >> >> 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. >>> >> >> I'd try providing the full path to 7z -- maybe that's why it probably >> can't find the file specified. >> >> Emile >> >> >> >> ______________________________**_________________ >> 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> >> > > > It was a silly problem. > > I guess Eclipse saves your PATH variables once the program is started, > instead of referencing the os directly. (I just did print "Current path is > %s" % os.path.expandvars("$PATH")) and that told me what was going on. > > Anyway, it's saving the files a .7z which isn't doing me much good. i was > under the impression i could save them as .zip, if not I'm just going to > have to password protect manually. > > got it working, had a flag in the wrong spot. Seems to work better than the Zip module in some ways. Thanks for the help.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor