newbie question: starting external application(win)?

Johan Lindberg johan at pulp.se
Thu Dec 9 08:46:44 EST 2004


>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:
>>> import os
>>> os.startfile("notepad.exe")

also, you can start an application from an associated file.

Start MS Word with:
>>> os.startfile("MyDocument.doc")

/Johan Lindberg




More information about the Python-list mailing list