Better Process Control (2 of 2)
win32api.ShellExecute()
- Typically opens “documents” - eg, execute “foo.doc”, and (typically) Word will open.
- Finer control over the new process.
- Can also execute arbitrary executables - not limited to documents.
- For example, to print a specific document:
win32api.ShellExecute(0, "print", \
"MyDocument.doc", None, "", 1)