[Tutor] Zip - password protect

James Reynolds eire1130 at gmail.com
Tue Aug 23 22:11:26 CEST 2011

On Tue, Aug 23, 2011 at 3:49 PM, Emile van Sebille <emile at 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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110823/d6a30a7b/attachment.html>

More information about the Tutor mailing list