os.shell, recursion, encryption
55555
55555 at dakotacom.net
Mon Feb 14 14:16:55 EST 2000
How does os.popen work? I'm afraid that I don't understand pipes. I
thought they had something to do with commands like 'blah >> blah2' which
would append blah2 with blah, right? If that is a pipe then that's all I
know what to do with it. Can it be used to send a command like 'pkzip
-sasdf asdf.zip *.txt' and return without generating a bunch of windows?
Thanks.
On Mon, 14 Feb 2000 08:40:54 +0100, Gerrit Holl <gerrit.holl at pobox.com>
wrote:
> 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
>
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
More information about the Python-list
mailing list