From 0fb1d826987189005b3bedaf7660e93594950c85 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Wed, 20 Nov 1996 15:13:24 +0000 Subject: Added reference to pdf documentation and bbpy, correctly explained difference between aetools.Error and MacOS.Error for appletscript programs. --- Mac/Demo/applescript.html | 7 +- Mac/Demo/cgi/cgitest.cgi.rsrc.hqx | 239 +++++++++++++++++++------------------- Mac/Demo/using.html | 40 ++++--- 3 files changed, 148 insertions(+), 138 deletions(-) diff --git a/Mac/Demo/applescript.html b/Mac/Demo/applescript.html index 6d8688e..379ac60 100644 --- a/Mac/Demo/applescript.html +++ b/Mac/Demo/applescript.html @@ -157,10 +157,9 @@ AppleScript is basically a connectionless RPC protocol nothing happens when we create to talker object. Hence, if the destination application is not running we will not notice until we send our first command. There is another thing to note about errors returned by -AppleScript calls: even though MacOS.Error is raised not -all of the errors are actually OSErr-type errors, some -are error codes returned by the server application. In that case, the -error message will be incorrect.

+AppleScript calls: MacOS.Error is raised for +all of the errors that are known to be OSErr-type errors, +server generated errors raise aetools.Error.

That concludes our simple example. Again, let me emphasize that scripting support in Python is not very complete at the moment, and diff --git a/Mac/Demo/cgi/cgitest.cgi.rsrc.hqx b/Mac/Demo/cgi/cgitest.cgi.rsrc.hqx index 9377d2c..9e00e3a 100644 --- a/Mac/Demo/cgi/cgitest.cgi.rsrc.hqx +++ b/Mac/Demo/cgi/cgitest.cgi.rsrc.hqx @@ -1,122 +1,121 @@ (This file must be converted with BinHex 4.0) -:%'0RDA4PFh3ZBfGT,R*cFQ-!FR0bBe*6483!N!JI#T%Z!*!%!3!!!"e"!!!F33! -!!FNf&#"8)'J!&#"3I4'`D"%!1J&R*K)[$%kk!J`-1J"DH4"MCfPdCA0d,Q0RD5j -bFh*MD3)!!!"bFh*M8P0&4!#3"(*cFQ058d9%!*!BVPNQq`#3"Km+ra(!U'N"(8! -4rr-6F!!3,[rc[G)4CK"40Vj9D`%"3N5pSEj9D`%"-&%b!@FH4"8-!!!FC4*`!"! -Z3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m!N!B(3A4YF!!$!*!%,&"jG$J!!!!"4P*&4J!#!!%!J3!!!)!!!`#$580 +1)`!#!!%!J!!!!)%!!`##!!!!!3#3"!N!N!B"!3%!!!%!!!!G33!!(%%!!!(*!21 +aT"a)!!!!(!'k!!T#6N4-!!!!@NP$6L-!!`"Q8dPD43!!!*C'8N9'!!)!SQPMFb- +!!`$'D@0X0!!#!2CTBf`i!!)"'QPMFc3!!J%qD@0c1!!#!@*3HA3i!!!"KP"[F(3 +!!!'5!)$rr`!!'rm!N!3",2rr!*!*J2rr!!!"9J#3"B(rr`!!#MN!N!@#rrm!!"- +F!*!%rj!%!!!""!#3"B(rr`!!#Li!N!@!rrm!!"-4!*!&Jrrr!!!Ep!#3"!%Xrrm +!!!%5!*!&J2rr!!!)BJ#3"B(rr`!!%88!N!@#rrm!!"SS!*!&J2rr!!!#@J#3"B( +rr`!!#cd!N!@#rrm!!"3J!*!&J2rr!!!%AJ#3"B(rr`!!$8%!N!@#rrm!!"BN!*! +&J2rr!!!)TJ#3"B(rr`!!%BN!N!@#rrm!!"TX!*!&J2rr!!!*+J#3"B(rr`!!%Jd +!N!@#rrm!!"V`!*!+(#m!N!@"rrm!!"`d!*!%$NphEQ9b)(*PFfpeFQ0PAq`: diff --git a/Mac/Demo/using.html b/Mac/Demo/using.html index fb1eb18..2d1ee32 100644 --- a/Mac/Demo/using.html +++ b/Mac/Demo/using.html @@ -1,9 +1,9 @@ -Using Python on the Macintosh +Using Python 1.4 on the Macintosh -

Using Python on the Macintosh

+

Using Python 1.4 on the Macintosh


This document is an introduction to using Python on the Apple @@ -13,6 +13,13 @@ HREF="http://www.python.org/doc/tut/tut.html">Python Tutorial by Guido van Rossum. This guide more-or-less replaces chapter two of the tutorial, and provides some additional material.

+The tutorial, along with other indispensible documentation like the +library reference and such, is also available in a number of different +formats at +ftp://ftp.python.org/pub/python/doc. The Adobe Acrobat .pdf +files are probably a good choice for reading or printing the documents +from your mac.

+ There is currently no good tutorial for the mac-specific features of Python, but to whet your appetite: it has interfaces to many MacOS toolboxes (quickdraw, sound, quicktime, open scripting, etc) and @@ -21,15 +28,12 @@ numbers, image manipulation, etc). Some annotated sample programs are available to give you an idea of Python's power.

-The document refers to Python 1.3.3 or higher, some of the features -(like setting applet options) will not work in earlier versions of -Python.

-

Invoking the interpreter

The name of the interpreter may differ on different installations: it may be called Python, PythonPPC (for powerpc -macs) or Python68K (indeed, for 68K macs). It will always +macs), PythonCFM68K orPython68K (both for 68K macs). +It will always be recognizable by the "16 ton" icon, though. You start the interpreter in interactive mode by double-clicking its icon:

@@ -84,6 +88,12 @@ the interpreter will close the window and quit as soon as the script is done executing, see below under startup options for a way to change this.

+

+There is a BBEdit extension available that allows you to run Python +scripts more-or-less straight from your bbedit source window. Check +out the Mac:Tools:BBPy folder. +
+ It is a good idea to have the names of all your scripts end in .py. While this is not necessary for standalone scripts it is needed for modules, and it is probably a good idea to start the @@ -300,10 +310,11 @@ sub-dialog. An applet is a fullblown application written in Python, similar to an AppleScript applet (and completely different from a Java -applet). Applets are currently only supported on PowerPC macintoshes, +applet). Applets are currently supported on PowerPC macintoshes and on +68K macintoshes if you use the CFM68K version of the interpreter, and are created using the mkapplet program. You create an -applet by dropping the python source script onto mkapplet. The -Demo folder contains an example of a more involved applet +applet by dropping the python source script onto mkapplet. +Example 2 is a more involved applet with its own resource file, etc.

Note that while an applet behaves as a fullblown Macintosh application @@ -324,7 +335,7 @@ defaults.

Actually, not only applets but also the interpreter itself can have non-default settings for path and options. If you make a copy of the interpreter and drop this copy onto EditPythonPrefs you will have an -interpreter that has a different set of default settings. +interpreter that has a different set of default settings.

Where to go from here

@@ -339,7 +350,8 @@ There are some annotated sample programs available that show some mac-specific issues, like use of various toolboxes and creation of Python applets.

-Finally, the Demo folder in the Macintosh distribution +Finally, the Demo and Mac:Demo +folders in the Macintosh distribution contains a number of other example programs. Most of these are only very lightly documented, but they may help you to understand some aspects of using Python.

@@ -385,7 +397,7 @@ Python attempts to keep its preferences file up-to-date even when you move the Python folder around, etc. If this fails the effect will be that Python cannot start or, worse, that it does work but it cannot find any standard modules. In this case, start Python examine sys.path. -If it is incorrect remove the Python preferences file from the system +If it is incorrect remove any Python preferences file from the system folder and start the interpreter while the interpreter sits in the main Python folder. This will regenerate the preferences file.

@@ -395,7 +407,7 @@ The next section to check out is the annotated sample progr


Jack Jansen, -jack@cwi.nl, 05-Sep-1996. +jack@cwi.nl, 20-Nov-1996. -- cgit v0.12