]> granicus.if.org Git - python/commitdiff
The minimal scripting example now actually works.
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 1 Apr 2003 22:30:23 +0000 (22:30 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 1 Apr 2003 22:30:23 +0000 (22:30 +0000)
Mac/OSXResources/app/Resources/English.lproj/Documentation/scripting.html

index 9d2fe0e1032341c14d709634aa802e880504852f..ae9ccee881238f457974f7a7d881190336555f99 100644 (file)
 <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
 
@@ -30,6 +24,14 @@ 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