newbie question: starting external application(win)?

  • Thread starter Frank Esselbach
  • Start date
F

Frank Esselbach

Hello,

I'am new in python. I need informations, how its possible run another
(non-python) exe file from python without terminate the python system.

I have googeled, but could not find informations that I can understand.
The most informations comes from unix/linux butIneed this for win32.

Thanks a lot, Frank
 
D

Diez B. Roggisch

I have googeled, but could not find informations that I can understand.
The most informations comes from unix/linux butIneed this for win32.

The module popen2 is your friend. Or the os.spawn* methods in module os.
 
P

Peter Hansen

Frank said:
Hello,

I'am new in python. I need informations, how its possible run another
(non-python) exe file from python without terminate the python system.

I have googeled, but could not find informations that I can understand.
The most informations comes from unix/linux butIneed this for win32.

There's a variety of options, ranging from os.popen and os.system
through spawn, the new in 2.4 subprocess module, and os.startfile.

Which one is best for you might depend on specifics. You can
either read the docs for the "os" module or "subprocess", or
tell us more detail. What exe are you trying to run, and how
are you doing it now which is "terminating the python system"?

-Peter
 
J

Johan Lindberg

The module popen2 is your friend. Or the os.spawn* methods in module
os.

Another (simpler IMO) way to do it is to use os.startfile.

To start Notepad:
also, you can start an application from an associated file.

Start MS Word with:
/Johan Lindberg
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top