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:
<http://appscript.sourceforge.net/py-appscript/doc/osax-manual/index.html>
And there's this about invoking the shell from Applescript:
<http://developer.apple.com/library/mac/#technotes/tn2002/tn2065.html>
HTH, Charles
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG