Wolfgang Keller wrote:

Is there a way to write "folder actions" for MacOS X in Python?

Ideally, you'd use PythonOSA <http://homepage.mac.com/philip_aker/osa/osa.html>, but it doesn't yet support handling of arbitrary Apple events. For now, your options are:


1. Use an AppleScript to run your Python scripts via 'do shell script' when it receives Folder Action events.

2. Use an AppleScript to forward Folder Action events to a faceless background application (FBA). Scriptable FBAs are easy enough to write in Python using aem.receive (see <http://freespace.virgin.net/hamish.sanderson/appscript.html>).


BTW, the second option could be extended to create a general-purpose system for forwarding Folder Actions to user-installed shell scripts of any kind. If anyone is interested in writing such a thing, email me and I'll be happy to discuss further.


has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to