[Pythonmac-SIG] reposting: Q: emulating os.system() on macs?
Jack Jansen
jack@oratrix.nl
Thu, 02 Dec 1999 16:00:45 +0100
> [BTW, the application I need to run is nsgmls, a SGML-based validator
> (http://www.jclark.com/sp/). ]
And are you going to port nsgmls yourself, or is it already available for the
mac? If you're doing the port yourself you could think of wrapping the whole
thing up in a Python extension module, so you don't have to fire up a separate
program at all.
If you have a port of nsgmls and it understands the "Open Document" Appleevent
you can use the applescript modules to first ask the finder to open the
application (see aetools.TalkTo for sample code) and then use the standard
scripting methods to ask the application to open the file (an example is in
the Mac:Demo folder). And if nsgmls has a nice unique signature you can even
skip the first step if your input file has the correct creator: send the "open
document" command to the finder and it'll open the app as well.
--
Jack Jansen | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm