Finding Return Code From GPG

Nomen Nescio nobody at dizum.com
Sat Jul 8 07:30:03 EDT 2006


On Sat, 08 Jul 2006 00:26:06 +0200, Piet van Oostrum wrote:

> 
>>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 <scraggs at test.invalid>"
> 
>>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]

That worked, thanks very much; and my thanks to all who replied.












More information about the Python-list mailing list