Decrypting zip file encrypted by gpg
<p>When i am trying to decrypt this file in shell using cmd below:</p>

<pre><code>gpg test.zip.asc
</code></pre>

<p>After giving the pass I am getting decrypted file <code>"test.zip"</code> in same folder but using python script I am not able to get the decrypted file. No error occurs, any idea on what I'm doing wrong ?</p>

<pre><code>import gnupg

def testgpg():    
    print "testgpg function started"

    encrypted_file = "test.zip.asc"
    passwd = "passwd"
    gpg = gnupg.GPG(gnupghome='/home/centos/.gnupg')
    try:
        print "trying"
        gpg.decrypt(encrypted_file, passphrase=passwd)
        print "decrypted"
    except Exception as e:
        print "not decrypted: --&gt;", str(e)

testgpg()
</code></pre>