[Pythonmac-SIG] osascript question

Martina Oefelein Martina at Oefelein.de
Sun Oct 5 15:12:07 EDT 2003


Hi Nate,

> I'm new to Python and really new to Applescript.  Could someone explain
> while the following script works ok from the command-line but not when 
> run
> as a CGI?
...
> the_command = os.popen(applescript)

the cgi runs under the user account of the web server, which probably 
doesn't have access to user-interface stuff (not to speak of iTunes.app 
running in your account).

BTW, You might want to use popen3 to read stderr, in order to read 
possible error messages.

> ASKING FOR aete DICTIONARY IN '/Applications/iTunes.app'
> Launched /Applications/iTunes.app
> Unpack returned empty value: []

you might try Bob's aeve module instead. Also search in the archives of 
this mailing lists for tips regarding iTunes.

ciao
Martina




More information about the Pythonmac-SIG mailing list