summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-04-01 22:30:23 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-04-01 22:30:23 (GMT)
commitb60352992f04787fff0ac12b522000a59e92c4bd (patch)
tree94dd693ac5e77189a6f9c295c277d27fb70ae3ed /Mac
parent9dd78101d77ca3ff3de2f273b321aeddfa929238 (diff)
downloadcpython-b60352992f04787fff0ac12b522000a59e92c4bd.zip
cpython-b60352992f04787fff0ac12b522000a59e92c4bd.tar.gz
cpython-b60352992f04787fff0ac12b522000a59e92c4bd.tar.bz2
The minimal scripting example now actually works.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html18
1 files changed, 10 insertions, 8 deletions
diff --git a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html
index 9d2fe0e..ae9ccee 100644
--- a/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html
+++ b/Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html
@@ -14,22 +14,24 @@
<p>Python has a fairly complete implementation of the Open Scripting
Architecure (OSA, also commonly referred to as AppleScript), allowing
you to control scriptable applications from your Python program,
-and with a fairly pythonic interface. The following pieces of
-AppleScript and Python are rougly identical (XXXX Not true right now!):</p>
+and with a fairly pythonic interface. This piece of
+Python:</p>
<blockquote><tt><pre>
-tell application "Finder"
- get name of window 1
-end tell
-</pre></tt></blockquote>
-
-<blockquote><tt><pre>
import Finder
f = Finder.Finder()
print f.get(Finder.window(1).name)
</pre></tt></blockquote>
+<p>is identical to the following piece of AppleScript:</p>
+
+<blockquote><tt><pre>
+tell application "Finder"
+ get name of window 1
+end tell
+</pre></tt></blockquote>
+
<p>To send AppleEvents to an application you must first create the Python
modules interfacing to the terminology of the application (what
<tt>Script Editor</tt> calls the "Dictionary"). Use the IDE menu command