diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-06-13 14:59:26 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-06-13 14:59:26 (GMT) |
commit | 097da0dc012d8c8164a043eee8f4b9622bc7b843 (patch) | |
tree | 597c32dbbcb8ae0b1b171e088e22637c3c7eae07 /Doc | |
parent | 880be6f1cfbfc482d041dfa06a40f4114aa1c141 (diff) | |
download | cpython-097da0dc012d8c8164a043eee8f4b9622bc7b843.zip cpython-097da0dc012d8c8164a043eee8f4b9622bc7b843.tar.gz cpython-097da0dc012d8c8164a043eee8f4b9622bc7b843.tar.bz2 |
Documented the fact that the main class now mimicks the OSA "application" class.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/mac/scripting.tex | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Doc/mac/scripting.tex b/Doc/mac/scripting.tex index f126e3c..43da493 100644 --- a/Doc/mac/scripting.tex +++ b/Doc/mac/scripting.tex @@ -31,7 +31,7 @@ In Python, the following code fragment will do the same: import Finder f = Finder.Finder() -print f.get(Finder.window(1).name) +print f.get(f.window(1).name) \end{verbatim} As distributed the Python library includes packages that implement the @@ -64,10 +64,12 @@ direct object as the first argument and all optional parameters as keyword arguments. AppleScript classes are also implemented as Python classes, as are comparisons and all the other thingies. -Note that in the current release there is no coupling between the main -Python class implementing the verbs and the Python classes implementing -the AppleScript classes. Hence, in the example above we need to use -\code{f.get(Finder.window(1).name)} in stead of the more Pythonic +The main +Python class implementing the verbs also allows access to the properties +and elements declared in the AppleScript class "application". In the +current release that is as far as the object orientation goes, so +in the example above we need to use +\code{f.get(f.window(1).name)} in stead of the more Pythonic \code{f.window(1).name.get()}. |