Re: [Tutor] Running an exe from Python

2007-02-28 Thread Nagendra Singh
Thanks a lot for all you helps. Alan your tutorial is very helpful But I have another problem which I will post soon. On 2/26/07, Alan Gauld [EMAIL PROTECTED] wrote: Nagendra Singh [EMAIL PROTECTED] wrote Thanks a lot for all the suggestions. I used the function subprocess.call (

Re: [Tutor] Running an exe from Python

2007-02-26 Thread Dan Klose
On 2/26/07, Nagendra Singh [EMAIL PROTECTED] wrote: 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

Re: [Tutor] Running an exe from Python

2007-02-26 Thread Alan Gauld
Nagendra Singh [EMAIL PROTECTED] wrote 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?? The result is 1 which indicates

Re: [Tutor] Running an exe from Python

2007-02-23 Thread Alan Gauld
Rikard Bosnjakovic [EMAIL PROTECTED] 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

[Tutor] Running an exe from Python

2007-02-22 Thread Nagendra Singh
Hi, I am trying to learn Python and have no prior programming experience. My problem is that I am trying to call an .exe through Python, the exe gives certain information about a file when I simply type it at the command prompt, something like C: getinfo C:\Singh\abc.bcd and it displays the

Re: [Tutor] Running an exe from Python

2007-02-22 Thread Hugo González Monteverde
Hi, Take a lok=ok at the module named subprocess. You can catch the output of invoked programs with this. There is also a module called commands but it its not available in windows. Hugo ___ Tutor maillist - Tutor@python.org

Re: [Tutor] Running an exe from Python

2007-02-22 Thread Richard Querin
On 2/22/07, Nagendra Singh [EMAIL PROTECTED] wrote: What it does is that opens and closes the command window really fast and displays a value of 1 in the interpreter. How can I get python to display the results in the interactive window or what is the right way to do this. I assume you're

Re: [Tutor] Running an exe from Python

2007-02-22 Thread Rikard Bosnjakovic
On 2/22/07, Nagendra Singh [EMAIL PROTECTED] 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: http://docs.python.org/lib/os-newstreams.html#os-newstreams -- - Rikard.

[Tutor] running a .exe

2005-12-22 Thread Robin Buyer
How do you run a .exe from inside a python program. randomexample: print "What would you like to do today? " print "E - email" print "I - internet" what = input("Choose: ") if what == "E": Heres where i would need torun IEXPLORE.exe ___ Tutor

Re: [Tutor] running a .exe

2005-12-22 Thread Kent Johnson
Robin Buyer wrote: How do you run a .exe from inside a python program. random example: print What would you like to do today? print E - email print I - internet what = input(Choose: ) if what == E: Heres where i would need to run IEXPLORE.exe Look at os.system()

Re: [Tutor] running a .exe

2005-12-22 Thread Robin Buyer
The internet was just an example. I'm just looking at how to open .exe from python. - Original Message - From: Liam Clarke-Hutchinson [EMAIL PROTECTED] To: 'Robin Buyer' [EMAIL PROTECTED]; tutor@python.org Sent: Thursday, December 22, 2005 7:35 PM Subject: RE: [Tutor] running a .exe Hi

Re: [Tutor] running a .exe

2005-12-22 Thread Kent Johnson
Robin Buyer wrote: I created a small program to test os.system: import os.path os.system(C:\Program Files\Internet Explorer\IEXPLORE.EXE) when i run this from the command line I get an error message: 'C:\Program' is not recognized as an internal or external command, operable program or

Re: [Tutor] running a .exe

2005-12-22 Thread Robin Buyer
Ahh. That helps a lot. Thanks. -Robin - Original Message - From: Kent Johnson [EMAIL PROTECTED] To: Python Tutor tutor@python.org Sent: Thursday, December 22, 2005 7:46 PM Subject: Re: [Tutor] running a .exe Robin Buyer wrote: I created a small program to test os.system