1

Well I have tried all of methods available on StackOverflow

1) !myfile.exe args

2) subprocess.call() and 3) subprocess.POpen() as per What's the difference between subprocess Popen and call (how can I use them)?

4) os.system as per How to run external executable using Python?

My program starts, but I am not seeing any output window, Actually my.exe programme is compiled using VisualStudio and I am taking few inputs in that .exe program using StdIn,

I have tried os.wait(), subprocess.wait()`` os.sleep(3) command my still output comes and disappears.

I have also tried this how to run an exe file with the arguments using python but problem is same.

What does my .exe program do? Actually I am giving one file ".bin" file as command argument to my program. Further my program prompts user to take few strings as input using Std In.

Community
  • 1
  • 1
Muhammad Zeeshan
  • 470
  • 7
  • 24
  • Can you provide the code that doesn't work? What does your .exe program to do? What does your program require from stdin? Do you have to interact with your .exe program (as in, should python block while your program runs in a shell and only continue when you close your program)? – Brendan Abel Jan 26 '16 at 19:02

1 Answers1

0

If you run your python program from the CMD you can insert a time.sleep() in the python code, which will make the output stay a bit longer.

Otherwise, in order to be in line with your question a bit more, try making an external temp script that will run your .exe with a pause command in it or something.

Pax Vobiscum
  • 2,551
  • 2
  • 21
  • 32