[Pythonmac-SIG] Python/appscript ready for primetime?
Daniel Miller
daniel at keystonewood.com
Wed Sep 5 14:56:12 CEST 2007
Karl,
Karl Sweitzer wrote:
> Is Python's appscript suitable and sufficiently mature for deployment
> in a commercial application?
I've used appscript for simple tasks (e.g. attaching a PDF to an
email) in an in-house application where I work. It works great for
what I need to do. My only complaint is that the AppleScript API's
are not always documented very well--I'm not sure how Word's
AppleScript is documented. That and AppleScript has the strangest
grammar I have ever encountered in a programming language.
> With the demise of VBA in Microsoft Office, we are faced with
> transitioning scripts that manipulate equations in Office and manage
> the interoperation of our application with Office. AppleScript is an
> obvious candidate, but coyote ugly in the eyes of many developers,
> including us. We are looking for viable alternatives.
Depending on what you are doing, it may work out well for you to
write a wrapper (implemented in Python and appscript) around the
parts of the Word Object Model that you will be using. This would
provide you with a nicer-to-use API than what appscript will give
you, and then appscript becomes an implementation detail. Of course
this may not be an option if you are using too much of the Word
Object Model.
> Python, augmented by appscript to access the Word Object Model, is
> the best candidate we've identified thus far. However, we have
> negligible experience with Python and zero experience with appscript.
> Further, we note that appscript has not reached version 1.0.
I think you will find Python to be a very nice alternative to VB.
Make sure you really dig into learning Python. Compared to VB you'll
find it much simpler to implement many things. But as the saying goes
"you can write Fortran in any language". Be sure to learn the Python
conventions and not just translate your VB conventions directly to
Python.
> Has anybody out there used Python and appscript for a commercial
> product? Does it deserve active consideration? Are there other
> candidates we should be considering?
I would say it definitely deserves some consideration, and I
personally don't know of any other candidates.
~ Daniel
More information about the Pythonmac-SIG
mailing list