Thanks, Sander.  That was simple enough, as I'm learning I sometimes get
caught up in these all too silly mistakes.

Becky

On Mon, Mar 7, 2011 at 11:38 PM, Sander Sweers <sander.swe...@gmail.com>wrote:

>  On Tue,  8 Mar 2011, 07:44:31 CET, Becky Mcquilling <
> ladymcse2...@gmail.com> wrote:
> > gpg = 'c:/program files (x86)/gnu/gnupg/gpg2.exe'
> > gpg = 'c:/program files (x86)/gnu/gnupg/gpg2.exe'
> >
> > subprocess.Popen('gpg', shell=True)
> >
> > It fails to run gpg and is not expanding the variable.  Is there a way
> > to do this that I'm missing?
>
> What you are doing is running Popen with a string 'gpg' instead of the
> variable gpg. The below should do the trick.
>
> subprocess.Popen(gpg, shell=True) # notice no single quotes
>
> Also you usually do not need a shell and I expect your use case runs fine
> without it.
>
> Greets
> sander
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to