os.shell, recursion, encryption

55555 55555 at dakotacom.net
Mon Feb 14 13:59:22 EST 2000


On Mon, 14 Feb 2000 10:46:30 -0500, "Gordon McMillan" <gmcm at hypernet.com> 
wrote:
> 55555 wrote:
> 
> > 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?
> 
> 1) You must mean os.system

Yes.  You're right.  I do mean os.system.

> 2) What cryptography toolbox? There are a number of them.

I have tried the 'Python Cryptography Toolkit' distributed as 
pycrypt100.tgz.  It looks great, but one of the demo programs says that 
the file deletion command is commented out because the author doesn't know 
if the program is perfect yet.  Is this the best one to be using or is 
there a "safe" one?

> > 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.
> 
> You probably want os.spawnv.

I looked at os.spawnv, but I don't have access to the Visual C++ Runtime 
Library so I don't know what my options are for mode.  Any ideas?
  
> > 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.
> 
> Yes, you can use a global var, as long as your callback uses 
> "global". It might be better to use a mutable arg as the user 
> arg to os.path.walk - say, a list.
> 
> - Gordon
> 

Thanks.


-----= 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