you should put this on the wiki, this is a grate example of the power this holds <br><br><div><span class="gmail_quote">On 3/27/07, <b class="gmail_sendername">has</b> <<a href="mailto:hengist.podd@virgin.net">hengist.podd@virgin.net
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On 27 Mar 2007, at 17:35, Kevin Walzer wrote:<br><br>>> Announcing the first release of PyOSA, a new OSA language
<br>>> component for Python.<br>><br>> I'm confused--how is this different from appscript?<br><br>In a nutshell, PyOSA makes Python a *full* peer to AppleScript.<br>Appscript is an Apple event bridge, allowing Python scripts to send
<br>Apple events to applications. That's great when you want to control<br>one process from another, but no help if you need a script that<br>controls and/or is controlled by its host process. For that level of<br>integration/interaction, you need a full OSA language.
<br><br>PyOSA packages the Python interpreter as an OSA language component,<br>allowing Python scripts to be attached to any OSA-aware application.<br>It also fully integrates appscript, allowing PyOSA scripts to send<br>
events directly to the host process and vice-versa. Attachability and<br>integrated Apple event support are essential for tasks like Folder<br>Actions and Mail rules, which you just can't do with appscript alone.<br><br>
For example, you could create a Mail rule that runs an 'AppleScript'<br>action whenever new messages are received. That rule would load a<br>PyOSA script and call its 'perform_mail_action_with_messages'<br>
function, passing it a list of message references. The script could<br>then go through those messages, getting and setting their properties,<br>moving them to other mailboxes, and so on.<br><br>Cool stuff, in other words, and even this is a relatively trivial
<br>example of OSA's full potential. Unfortunately, for various<br>historical reasons, OSA has never seen widespread adoption beyond the<br>AppleScript language and a relatively small number of applications.<br>But hopefully a new generation of OSA language components will begin
<br>to change this situation for the better.<br><br>HTH<br><br>has<br>--<br><a href="http://appscript.sourceforge.net">http://appscript.sourceforge.net</a><br><a href="http://rb-appscript.rubyforge.org">http://rb-appscript.rubyforge.org
</a><br><a href="http://appscript.sourceforge.net/objc-appscript.html">http://appscript.sourceforge.net/objc-appscript.html</a><br><br>_______________________________________________<br>Pythonmac-SIG maillist - <a href="mailto:Pythonmac-SIG@python.org">
Pythonmac-SIG@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/pythonmac-sig">http://mail.python.org/mailman/listinfo/pythonmac-sig</a><br></blockquote></div><br><br clear="all"><br>-- <br><br>"lalalalala! it's not broken because I can use it"
<br><br><a href="http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703">http://linux.slashdot.org/comments.pl?sid=194281&threshold=1&commentsort=0&mode=thread&cid=15927703
</a>