Calling Mac programs from Python instead of from AppleScript
python at rgbaz.eu
Thu Mar 20 10:26:22 CET 2008
On 19 mrt 2008, at 20:41, dvschorre at sbcglobal.net wrote:
> When I'm running Script Editor, I can get Maya to draw a sphere by
> tell application "Maya"
> execute "sphere"
> end tell
> When I try this using Python, I get this error message:
> IDLE 1.2.2
> Traceback (most recent call last):
> File "<pyshell#0>", line 1, in <module>
> NameError: name 'app' is not defined
> Maybe I need to load some libraries first.
I never used applescript more than to record some clicks but you might
tell application "/Applications/Autodesk/maya2008/Maya"
(replace maya2008 with you app's foldername)
tell application "/Applications/Autodeks/maya2008/Maya/Contents/MacOS/
> Please help me to get started.
like any other VFX app, maya is also adding python libs
you can access MEL commands from a python library:
> Dewey V. Schorre
More information about the Python-list