[Tutor] Running an exe from Python
singh01 at gmail.com
Mon Feb 26 17:48:29 CET 2007
Thanks a lot for all the suggestions. I used the function subprocess.call (
'c:\abc.exe c:\data\file1'), but as before the command window opens and
closes very fast a value of 1 is displayed. How do I see the results?? I am
sorry if I sound dumb.
On 2/23/07, Alan Gauld <alan.gauld at btinternet.com> wrote:
> "Rikard Bosnjakovic" <rikard.bosnjakovic at gmail.com> wrote
> >> How can I get python to display
> >> the results in the interactive window or what is the right way to
> >> do this.
> > Use os.popen:
> As Rikard, Richard and Hugo have pointed out there are
> numerous ways to do this in Python.
> The officially sanctioned way nowadays is to use the subprocess
> module. It supercedes all tthe previous methods being both more
> powerful, more flexible and fairly easy to use.
> All the techniques are discussed in my Using the OS topic in
> my tutorial.
> Alan Gauld
> Author of the Learn to Program web site
> Tutor maillist - Tutor at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor