How to bring appliation (such as Notepad) in front forcedly with 'subprocess' module of Python on MS Windows?
Environment: Windows XP, Python 2.5.4
I tried the followings.
## Notepad is invoked in front
>>> import subprocess
>>> command = r'notepad C:\tmp\foo.txt'
>>> subprocess.Popen(command) # opened in front
## Notepad is invoked but not in front
>>> import subprocess, time
>>> command = r'notepad C:\tmp\foo.txt'
>>> time.sleep(5) # click other application while sleeping
>>> subprocess.Popen(command) # opened but not in front!
I want notepad window to be in front forcedly even when other application is selected.