[Pythonmac-SIG] [ann] ASDictionary, ASTranslate updates

Charles Turner vze26m98 at optonline.net
Wed Dec 22 20:14:23 CET 2010

OK, I got it:

> import osax
> sa = osax.OSAX()
> print sa.do_shell_script("ls -l", administrator_privileges=True)

If you look in the Applescript dictionary, it appears the function syntax is:

> set theResult to do shell script unicode text ¬
>      as type class ¬
>      administrator privileges boolean ¬
>      user name unicode text ¬
>      password unicode text ¬
>      altering line endings boolean

So administrator privileges is a boolean.

Have a look at the documentation for py-appscript OSAX:


And there's this about invoking the shell from Applescript:


HTH, Charles

More information about the Pythonmac-SIG mailing list