os.shell, recursion, encryption

Gerrit Holl gerrit.holl at pobox.com
Mon Feb 14 02:40:54 EST 2000


55555 at dakotacom.net wrote on 950483324:
> I'm spawning pkzip for dos using os.shell() because I would like to use the encryption 
> feature.  As far as I can tell that is not available in the gzip library and the 
> documentation on the cryptography toolbox didn't give me the impression that all the bugs 
> were worked out.  Does anyone know whether that has changed?

Hmm, please type your lines a little shorter.
It's not a bug: cryptograhy and archiving are two different things. Only
Dos/Windows archivers combine them in one program.

> Anyway, os.shell() pops up a new dos box for each call. I'm using os.path.walk() and 
> making a lot of calls to the zip program.  I'm wondering if there is a way to not spawn 
> 40 windows.  0 windows would be ideal.

What about os.system()? Or os.popen (does it exist on dos?)?

> Finally, I'm wondering if there is a way to attach to a global variable while moving 
> around with os.path.walk()?  I understand recursion and have read Python's scope rules 
> but I can't seem to either pass local varaibles through or to attach to a global 
> variable.

Have a look at the 'global' keyword.

regards,
Gerrit.

-- 
Homepage: http://www.nl.linux.org/~gerrit
-----BEGIN GEEK CODE BLOCK----- http://www.geekcode.com
Version: 3.12
GCS dpu s-:-- a14 C++++>$ UL++ P--- L+++ E--- W++ N o? K? w--- !O
!M !V PS+ PE? Y? PGP-- t- 5? X? R- tv- b+(++) DI D+ G++ !e !r !y
-----END GEEK CODE BLOCK----- moc.edockeeg.www//:ptth




More information about the Python-list mailing list