I'm working on a Windows machine and want to use subprocess to run several commands from the command line.
Normally with bat files or some of the other scripting languages on Windows, I would set up a variable with the path to the command like so: gpg = 'c:/program files (x86)/gnu/gnupg/gpg2.exe' Then call the command the variable to avoid typing in the full path. When I do this with subprocess it works: subprocess.Popen('c:/program files (x86)/gnu/gnupg/gpg2.exe', shell=True) However when I do this: 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? Becky
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor