[melbourne-pug] Any Python-gnuPG success on Windows 7 and Python 3.3

Sam Lai samuel.lai at gmail.com
Tue May 27 06:49:09 CEST 2014


Without looking at the source code, could you try double-quoting the path, e.g.

pathtobin = "\"C:\\Program Files (x86)\\GNU\\GnuPG\\pub\\GPG.exe\"'

On 27 May 2014 13:52, David Crisp <dcrisp at netspace.net.au> wrote:
> Has anybody had any success getting Python-GnuPG working with Python3.3 on
> Windows 7?
>
> When I run it I get all sorts of errors that look likes its not really
> likeing the way the arguments are handled.
>
> It looks like the Argument / Attribute code isnt working properly. Before I
> push this back at the authors I was just wanting to make sure I was using it
> properly.
>
> THe documentation SAYS it works with windows BUT it only provides Linux
> examples.  So I MIGHT very well be implimenting it incorrectly.
>
> Code:
> import gnupg
> pathtobin = "C:\\Program Files (x86)\\GNU\\GnuPG\\pub\\GPG.exe"
> gpg = gnupg.GPG(gpgbinary = pathtobin, verbose = 'True')
> print(gpg)
>
> Errors:
>
> C:\Python33\python.exe C:/Users/dcrisp/Documents/Python/origin/gpgdecrypt.py
> C:\Program Files (x86)\GNU\GnuPG\pub\GPG.exe --status-fd 2 --no-tty
> --version
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.
> Traceback (most recent call last):
>   File "C:/Users/dcrisp/Documents/Python/origin/gpgdecrypt.py", line 12, in
> <module>
>     gpg = gnupg.GPG(gpgbinary = pathtobin, verbose = 'True')
>   File "C:\Python33\lib\site-packages\gnupg.py", line 669, in __init__
>     result.stderr))
> ValueError: Error invoking gpg: 1: 'C:\Program' is not recognized as an
> internal or external command,
> operable program or batch file.
>
> It looks like the attribute / argument generation code isnt working
> correctly.
>
> Looks like the fault (if there is one) is around line 687 in gnupg.py. But
> thats just a very rough guess and I have NO idea what to do to repair it.
>
> Regards,
> David
>
> _______________________________________________
> melbourne-pug mailing list
> melbourne-pug at python.org
> https://mail.python.org/mailman/listinfo/melbourne-pug


More information about the melbourne-pug mailing list