"Martin Miller" <ggrp1.20.martineau at dfgh.net> writes: > IMHO, the fact that there is no way to wait for the application to > finish is major deficiency with os.startfile() -- and why I often > cannot use it instead of other techniques [such as the much more > involved but limited os.spawnv() function]. > > I don't if if this is just a limitation of the implementation in the > Python os module or one with the underlying OS (Windoze) -- I suspect > the latter. os.startfile calls ShellExecute. AFAIK, if ShellExecuteEx were used, this could retrieve a process handle which you could wait for os so. With ctypes you can easily experiment with this kind of stuff. Another interesting feature, imo, is the 'verb' that you can pass to these functions. With this, you could for example specify 'print' to print the file instead of just opening it. Thomas
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4