[Python-checkins] CVS: python/dist/src/Mac/Demo applescript.html,1.9,1.10
Jack Jansen
jackjansen@users.sourceforge.net
2002年1月25日 07:28:41 -0800
Update of /cvsroot/python/python/dist/src/Mac/Demo
In directory usw-pr-cvs1:/tmp/cvs-serv26929
Modified Files:
applescript.html
Log Message:
Some modifications and clarifications (by me) to Michael's mods.
Index: applescript.html
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/applescript.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** applescript.html 2002年01月25日 15:06:19 1.9
--- applescript.html 2002年01月25日 15:28:39 1.10
***************
*** 78,82 ****
we always select <code>Python:Mac:Lib:lib-scriptpackages:StdSuites</code>. (There is
one exception to this rule: when you are generating <code>StdSuites</code> itself
- <!-- you select <code>cancel</code>.) -->
you select <code>_builtinSuites</code>.)
</p>
--- 78,81 ----
***************
*** 88,94 ****
resulting python module. Remember to change folders for the first
module—you don't want to clutter up, say, the
! Eudora folder
! <!--Why Eudora folder? Was there an earlier example featuring Eudora?
! Added "say" to make it seem less specific.-->
with your python
interfaces. If you want to skip a suite, press <code>cancel</code> and the process
--- 87,91 ----
resulting python module. Remember to change folders for the first
module—you don't want to clutter up, say, the
! Disk Copy folder
with your python
interfaces. If you want to skip a suite, press <code>cancel</code> and the process
***************
*** 107,111 ****
<li>Specify the folder <code>Python:Mac:Lib:lib-scriptpackages:StdSuites</code>
- <!-- to import the standard suites (or <code>cancel</code> if you are -->
to import the standard suites (or <code>_builtinSuites</code> if you are
generating <code>StdSuites</code> itself). </li>
--- 104,107 ----
***************
*** 122,126 ****
<ul>
! <li>The interface package may need some editing by hand. For example,
<code>gensuitemodule</code> does not handle all Python reserved words, so
if
--- 118,122 ----
<ul>
! <li>The interface package may occasionally need some editing by hand. For example,
<code>gensuitemodule</code> does not handle all Python reserved words, so
if
***************
*** 130,134 ****
take a look at how the
<code>print</code> verb is handled (automatically by <code>gensuitemodule</code>)
! in the standard suites. </li>
--- 126,132 ----
take a look at how the
<code>print</code> verb is handled (automatically by <code>gensuitemodule</code>)
! in the standard suites. But: f you need to edit your package this should be considered a
! bug in gensuitemodule, so please report it so it can be fixed in future releases.
! </li>
***************
*** 145,153 ****
single level of modules, with uncertain semantics. With the new structure,
it is possible for programs to override standard suites, as programs often do.
- It is a good idea to convert your own old programs to the new scheme.
- <!-- , but if you -->
- <!-- really want them, the old standard suites are still available in -->
- <!-- <code>:Mac:Lib:lib-scripting</code>. -->
- <!-- Seems to be gone in MacPython 2.2 -->
</li>
--- 143,146 ----
***************
*** 209,213 ****
They allow you to create object IDs, which can then be passed to the verbs.
For instance,
- <!--Is this for Eudora again? I'll assume so...-->
when scripting the popular email program Eudora,
you would use <code>mailbox("inbox").message(1).sender</code>
--- 202,205 ----
***************
*** 234,242 ****
Finally, we get the “table of contents” of the module, listing all
classes and such
! by code, which is used by <code>gensuitemodule</code>.
! <!--
! | Not sure I understand. Is the code used by gensuitemodule, or is the TOC
! | module used by gensuitemodule?
! -->
</p>
--- 226,232 ----
Finally, we get the “table of contents” of the module, listing all
classes and such
! by code, which is used by <code>gensuitemodule</code> itself: if you use this
! suite as a base package in a later run this is how it knows what is defined in this
! suite, and what the Python names are.
</p>
***************
*** 281,285 ****
You may want to omit it if you want to talk to the application
only if it is already running, or if the application is something like the Finder.
! Another way to ensure that the application is running is to call <code>talker.start()</code>.
</p>
--- 271,275 ----
You may want to omit it if you want to talk to the application
only if it is already running, or if the application is something like the Finder.
! Another way to ensure that the application is running is to call <code>talker._start()</code>.
</p>
***************
*** 319,323 ****
signature to use is <code>MACS</code>. You will need to edit the main class
in the <code>__init__.py</code> file of the created package and change the value
! of <code>_signature</code> to <code>MACS</code>.
</p>
--- 309,314 ----
signature to use is <code>MACS</code>. You will need to edit the main class
in the <code>__init__.py</code> file of the created package and change the value
! of <code>_signature</code> to <code>MACS</code>, or use a subclass to the
! same effect.
</p>
***************
*** 348,354 ****
<p>
Under Mac OS X, the above still works, but with some new difficulties.
! The application package structure can hide the ‘AETE’ or ‘AEUT’ resource
! from <code>gensuitemodule</code>, so that, for example, it cannot generate an OSA interface to
! iTunes.
</p>
--- 339,348 ----
<p>
Under Mac OS X, the above still works, but with some new difficulties.
! The application package structure can hide the ‘AETE’ or
! ‘AEUT’ resource from <code>gensuitemodule</code>, so that,
! for example, it cannot generate an OSA interface to iTunes. Script
! Editor gets at the dictionary of such programs using a ‘Get
! AETE’ AppleEvent, if someone wants to donate code to use the same
! method for gensuitemodule: by all means!
</p>