Re: [Pyobjc-dev] Python as an AppleScript Replacement?
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-03-02 07:06:03
|
On Sunday, Mar 2, 2003, at 07:10 Europe/Amsterdam, Peter Montagner wrote: > I don't know if this has been asked before (I couldn't access the list > archives) but has anyone thought of using PyObjC as an AppleScript > replacement? Complete Open Scripting Architecture compliance (Script > Editor support, etc) probably isn't worth it but what about doing > something functionally similar? Something like: > > import osa > > finder = osa.getApp("Finder") > finder.empty_trash() > > textEdit = osa.getApp("TextEdit") > text = textEdit.doument[1].text > print text Did you look at the OSA support in MacPython? It already does most of what you want, adding the missing features is probably less work than starting from scratch. Ronald |