How do you execute an OS X application (bundle) from Python?

David Hughes dfh at forestfield.co.uk
Thu Nov 4 05:50:44 EST 2004


For example, in Python in a Nutshell, Alex Martelli shows how you can
run a Windows (notepad.exe) or Unix-like (/bin/vim) text editor using
      os.spawnv(os.P_WAIT, editor, [textfile])
But how would you call the OS X text editor /Applications/TextEdit.app
- which appears to be a whole directory inside /Applications?

I'm sorry if the answer is blindingly obvious. I work alone and
sometimes just get stuck, then have to ask in public and risk
appearing a noodle brain.

David



More information about the Python-list mailing list