Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: call an exturnal program in python

Steve Holden
Guest
 
Posts: n/a
#1: Nov 21 '08
Adam wrote:
Quote:
I am trying to run an external program in my code using
os.system('exename -exearg') but the exe has an "&" in it so windows
thinks it's two commands any way around this?
>
Have you tries quoting the exename:

os.system('"exename" -exearg')

That might help. How do you run it from the command line?

You might be better using subprocess.call(), since that allows you to
run subprocesses without the shell interpreting the command line.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/


Closed Thread