pipes python cgi and gnupg

alisonken1 alisonken1 at gmail.com
Wed Jan 9 00:29:06 EST 2008


On Dec 28 2007, 7:07 pm, byte8b... at gmail.com wrote:
<snip>
> form = cgi.FieldStorage()
> if not form.has_key("pass"):
>    print "Enter password"
>
> filename = "test.gpg"
> pass = form.getvalue("pass").strip()
> os.system("gpg --version > gpg.out")
> os.system("echo %s | gpg --batch --password-fd 0 --decrypt %s > d.out"
> %(pass,filename))

The last time I checked, "pass" is a reserved word in Python.

Since you are using a reserved word as a variable, maybe that's what's
messing with your output?



More information about the Python-list mailing list