On 27 Feb 2008, at 22:49, tom wible wrote: > just wrote a script to kill live eyetv: > > #! /usr/bin/env python > from appscript import * > app(u'/Applications/ > EyeTV.app').window[its.name.startswith('EyeTV')].close() > > and it works great fom the cli, but not in crontab: > [...] > X-Cron-Env: <PATH=/usr/bin:/bin> > [...] > raise AttributeError, "Unknown property, element or command: %r" > % name > AttributeError: Unknown property, element or command: 'startswith'
Looks like you have an older version of appscript installed on the / Library Python - 'startswith' was changed to 'beginswith' a while back for consistency with AppleScript. I'd suggest installing the latest version (0.18.1) in both Pythons and updating existing scripts as necessary. HTH has -- http://appscript.sourceforge.net http://rb-appscript.rubyforge.org _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig