help - system commands
jam
jam at newimage.com
Sat May 15 11:04:56 EDT 1999
On Sat, May 15, 1999 at 01:55:46PM +0000, gony at my-dejanews.com wrote:
>
> i'd like to use pgp to encrypt files
>
cool.
> i'd like to be able to do system calls to pgp passing the file name to
> encrypt and the key to use.
>
> how do i do this?
>
>
to solve the problem in a straightforward way, have a look at 'os.system',
and see if it will do what you want.
>
> I'm working on a win95 machine, have looked at the commands library but
> that seems to be for unix machines.
>
I haven't used the windows version of python... perhaps someone will be able
to answer this question and explain the reasons why nicely.
>
> it needs to be able to be called in a for loop multiple times for long
> file lists, also i'll need to be able to do syste calls to decrypt the
> files as well.
>
have a look at the pgp docs, and see if you can pass the encrypter/decrypter
a filename that contains the list of files.. this will be much easier to
handle, and will probably perform better. there are definate disadvantages
to calling 'os.system' *many* times in a loop, especially when you are
invoking the same program over and over again. more important, though,
should be to get an initial version of the code working, and see what
happens.
>
> any help would be most appreciated
>
hope this helps.
regards,
J
--
|| visit gfd <http://quark.newimage.com:8080/>
|| psa member #293 <http://www.python.org/>
|| New Image Systems & Services, Inc. <http://www.newimage.com/>
More information about the Python-list
mailing list