import os
os.system("notepad macros.txt")
or
from subprocess import Popen
Popen(["notepad", "macros.txt"])
both start notepad in the background. How to start it in the foreground?
You can try to use the start command, maybe the /MAX option will force notepad to be in foreground, otherwise if you can wait untill notepad shutdown, use the /WAIT option/
Popen(["start", "/MAX", "notepad", "macros.txt"], shell=True)
shell=True parameter (otherwise you'll have to specify the complete pathes), on my WindowsXP it works even without the /MAX option.