>>>>> Nomen Nescio <[EMAIL PROTECTED]> (NN) wrote:

>NN> Thanks, I used the popen function which did some of what I want. Here is
>NN> the code I used:

>NN> from subprocess import *

>NN> output = Popen(["gpg", "--output", "--verify", "sigtest"], 
>stdout=PIPE).communicate()[0]

You need a filename argument for --output.

>NN> That worked, sort of - it did the verification at least and I can see
>NN> the return code. 

>NN> What is still not working is the display from gpg. It shows up on the
>NN> monitor screen like this:

>NN> gpg: Signature made Tue 04 Jul 2006 08:04:10 AM CET using DSA key ID
>NN> 06B09BA4
>NN> gpg: Good signature from "Boz Scraggs <[EMAIL PROTECTED]>"

>NN> I need to get that into a file so I can parse it. Any further suggestions?

That output is passed to stderr. So you can get it in a string:

output = Popen(["gpg", "--output", "outfile", "--verify", "sigtest"], 
stderr=PIPE).communicate()[1]
-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to