[Pythonmac-SIG] Converting to AppleEvents
Dethe Elza
delza at livingcode.org
Wed Dec 7 17:35:11 CET 2005
On Wed 2005-12-07, at Wed 2005-12-07T07:52 AM, Brian Ray wrote:
[snipped]
> This seems to work well for now. However, is there a way to have
> os.system() wait till it's finished? In other words how to I get
> the osascript tool to not return until the script has actually
> finished.
You probably want to use subprocess, not os.system(). It's a more
advanced module and should allow you to wait for your script to
complete (or to interact with it while it's running if you like).
http://docs.python.org/lib/module-subprocess.html
--Dethe
"Computers are beyond dumb, they're mind-numbingly stupid. They're
hostile, rigid, capricious, and unforgiving. They're impossibly
demanding and they never learn anything." -- John R. Levine
More information about the Pythonmac-SIG
mailing list