OSAscript from python doesn't trigger privileges prompt

[email protected]
Newsgroups gmane.comp.python.apple
Message-ID <30380012.1372190732719.JavaMail.root@elwamui-muscovy.atl.sa.earthlink.net>
I'm writing a Python application that looks for a pkg file in a particular location, downloads it, and installs it.

Using osascript -e and Python's subprocess.Popen(), I can embed:

do shell script "sudo /usr/sbin/installer -pkg /path/to/file/filename.pkg -target /" with administrator privileges

When run interactively, this works fine. When the script hits the above line, it prompts me to enter my admin privileges and successfully runs installer.

When triggered by a launchd agent (in /Library/LaunchAgents/), the script runs and does everything except successfully install the package.

Any ideas what I'm doing wrong?

Thanks!
 Frank
_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.