Women in Technology

Hear us Roar



Article:
  Using Python and AppleScript Together
Subject:   Better way to call Python from Applescript?
Date:   2007-05-11 08:20:35
From:   msocias
Hi,


In the first page you mention that:


"So remember, this is one option to execute complex commands via the command line with Python, but it's generally a bad idea as there are better ways to use Python to solve your problems."


But then you go on describing how you can call Applescript from Python. Are there any better ways to call Python from Applescript than the one you mentioned (i.e., via "do shell script "python ... ?


Thanks,


..m

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Noah Gift photo Better way to call Python from Applescript?
    2007-05-11 10:07:34  Noah Gift | O'Reilly AuthorO'Reilly Blogger [View]

    Yes. "do shell script" is a great way to call python from applescript. I have an article I may write about writing a Cocoa GUI with just Applescript Studio and python. I wrote a decent Cocoa Application using just that!

    If your interested let me know...
    • Better way to call Python from Applescript?
      2007-05-13 17:47:43  msocias [View]

      Hi,

      Yes, I am very interested in that article. I think it would be a great way to put a Cocoa GUI on top of Pyhton.

      I have also heard that the scripting to framework library in Leopard will allow writing Pyhton apps with the Cocoa GUI.

      Hopefully you write that article.

      Thanks,

      ..m