ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Using Python and AppleScript Together
Subject:   the zen of python...
Date:   2007-05-11 06:50:44
From:   airdrummer
Response to: Shorter alias

also requires the reduction of redundancy: instead of repeating

app(u'/Applications/DiskWarrior.app')...

u should declare a variable:

dw=app('DiskWarrior')
dw.activate(timeout=3600)
dw.disk['main'].rebuild(replacing=k.yes_,
timeout=3600)
dw.quit(timeout=3600)


1 to 1 of 1
  1. Noah Gift photo the zen of python...
    2007-05-11 06:59:00  Noah Gift | O'Reilly AuthorO'Reilly Blogger [View]

1 to 1 of 1