[Pythonmac-SIG] Python+Automator?
Bob Ippolito
bob at redivi.com
Mon Jan 24 16:32:05 CET 2005
On Jan 24, 2005, at 10:21, Bob Savage wrote:
>
> On Jan 23, 2005, at 11:40 PM, Bob Ippolito wrote:
>
>> I would expect that the majority of actions that people will write in
>> Python will do very little inter-application communication anyway and
>> instead will do things that Python is significantly better than
>> AppleScript at (doing stuff on a network, mangling files, calling
>> into Objective-C frameworks, etc.).
>
> This is consistent with my first reading of the Automator website. It
> seemed to me that one could write little Python scripts perhaps
> similar to the "Services" menu, which could be strung together with
> other "services" inside of Automator as part of a workflow. I once
> built a whole graphics processing workflow in AppleScript (and a what
> is now a VERY old version of PhotoShop); there were some things that I
> might have been able to do in pure AppleScript, but took only two or
> three lines of Python code to do, so I invoked little Python scripts
> in a couple of places -- I'm sure many people have similar needs.
>
> The website says that you can invoke shell scripts from Automator,
> however, so from this angle the main thing missing is a little
> tutorial.
It does say you can invoke shell scripts, but it does not say how. It
may be that they simply expect you to use AppleScript's functionality
to do it, or perhaps they have a "do shell script" action. It's not
possible to say either way with the given information.
However, since it is not hard to do it from PyObjC as a plugin, and the
interface preserves more information and should be easier to use, there
is little reason to even consider the shell script option.
-bob
More information about the Pythonmac-SIG
mailing list