[Pythonmac-SIG] [MachOPython] starting an application from a Python script?

Kevin Ollivier kevino@tulane.edu
Tue, 23 Apr 2002 17:29:04 -0400


Hi all,

I'm using the 2.3 version of MachOPython downloaded from CVS. I have a
wxPython script which allows users to specify a "preferred" web browser and
HTML editor and then uses those preferred editors to preview/edit HTML
files. In Windows and Linux/UNIX, I call os.spawnv and pass in the program
location and filename to open. On Mac, however, this seems not to be
implemented. (There is no error message, but the call is not executed.
Online Mac library documentation does not list it as a supported method.)
What would be the equivalent way of doing this in MachOPython? I can use the
webbrowser module as a workaround for the browser, but that still leaves the
editor. Would I use something like AppleEvents for this?

Thanks for your help!

Kevin