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

has has.temp2 at virgin.net
Sat Nov 6 08:44:07 EST 2004


dfh at forestfield.co.uk (David Hughes) wrote in message news:<70bb9f8d.0411050817.412ab0b3 at posting.google.com>...

> I don't know if that will be possible. The reason for my original
> query was that I want to fire up an independent help viewer from an
> application - both of which will be bundle-built. In fact, I *don't*
> want to implement a wait, but I do want to use Popen from the
> subprocess module to launch the viewer - so that I can use its poll()
> method to check if it is already running should another launch be
> requested, and also kill it on exit from the main application. But,
> unlike Windows, poll() always returns a completion code of zero,
> instead of None, even though the process is still running.

Dunno if the os module is any use for process management at the GUI
level. (The docs don't indicate Mac compatibility, but I'm not sure if
they've been revised since OS9 days. You'd need to ask Jack Jansen
about this.) Anyway, I can show how to do it with Apple events if you
want; it's not hard.

HTH

has



More information about the Python-list mailing list