import gnupg
gpg = gnupg.GPG(homedir='/root/.gnupg')
filename=''
outputPath=''
stream=open(filename,'rb')
data=gpg.decrypt_file(stream, always_trust=False, passphrase='解密密码', output=outputPath)
print('ok',data.ok)
print('status',data.status)
import gnupg
gpg = gnupg.GPG(homedir='/root/.gnupg')
filename=''
outputPath=''
stream=open(filename,'rb')
data=gpg.decrypt_file(stream, always_trust=False, passphrase='解密密码', output=outputPath)
print('ok',data.ok)
print('status',data.status)