Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 1 | How to install Python 1.3 on your Macintosh |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 2 | ------------------------------------------------ |
| 3 | |
| 4 | Even if you don't usually read readme files: please read at least the |
| 5 | first sections of this file, failure to do so will probably result in |
| 6 | an unuseable python system. If this warning is too late and you already |
| 7 | have an non-functional python: it is best to remove all traces and start |
| 8 | with a fresh distribution. Especially don't forget to remove the |
| 9 | "python preferences" file from the Preferences folder, and possibly |
| 10 | "PythonCore" from the Extensions folder. |
| 11 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 12 | If this is your first encounter with python: you definitely need the common |
| 13 | user documentation (common to all platforms). You can find this (in various |
Jack Jansen | 59fcc5a | 1995-09-24 21:08:22 +0000 | [diff] [blame] | 14 | forms) on www.python.org and ftp.python.org. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 15 | |
| 16 | If you have a pre-system 7 macintosh: sorry, this release will not work |
| 17 | on your system. Too many sys7 features are used to make a sys6 python |
| 18 | easy to create. If you really want one: tell me, maybe I can be convinced. |
| 19 | Alternatively: get the sources, put in the necessary gestalt() and |
| 20 | compatability calls yourself and send me the results. |
| 21 | |
| 22 | If you don't have enough memory: the sizes choosen are somewhat arbitrary. |
| 23 | Try lowering them and seeing whether the resulting python is still usable. |
Jack Jansen | 8150760 | 1995-10-03 14:40:35 +0000 | [diff] [blame] | 24 | Note, however, that python running out of memory may result in your mac |
| 25 | freezing. I don't fully understand yet why the mac freezes instead of doing |
| 26 | something a little less drastic. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 27 | |
| 28 | PowerPC Macintosh instructions |
| 29 | ------------------------------ |
| 30 | |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 31 | 1. Remove older versions of "PythonCore" and "Python Preferences" |
| 32 | from your system folder. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 33 | |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 34 | 2. Run the MkPluginAliases applet. This will first ask you whether it should |
| 35 | create an initial preferences file. Let it do so. Next, it will create a |
| 36 | number of aliases in the PlugIns folder. If this fails in mysterious ways |
| 37 | try using the applescript in the PlugIns folder to create the aliases. |
| 38 | If that also fails: examine the script and create the aliases by hand |
| 39 | (and tell me what you did to make either of these two fail:-). |
| 40 | |
| 41 | 3. To make sure any applets you create can find the common interpreter code |
Jack Jansen | 59fcc5a | 1995-09-24 21:08:22 +0000 | [diff] [blame] | 42 | you should move PythonCore to the Extensions folder (drop it on the |
| 43 | System Folder and it will find its own way). Alternatively, you can |
| 44 | make an alias called "PythonCore" in the Extensions folder and |
| 45 | point it to the real PythonCore. You may want to start PythonPPC |
| 46 | again at this point to check that you actually put the extension in |
| 47 | the right place. |
| 48 | |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 49 | 4. You're all set now. Continue with the common instructions. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 50 | |
| 51 | 68K Macintosh instructions |
| 52 | -------------------------- |
| 53 | |
| 54 | 1. Remove old "Python Preferences" file from the Preferences folder, if you |
| 55 | have one (the file, that is, not the folder:-). |
| 56 | |
| 57 | 2. Run Python68K. This will create an initial preferences file (after |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 58 | asking you if that's ok with you). Quit python. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 59 | |
| 60 | 3. Continue with the next section. |
| 61 | |
| 62 | Common instructions |
| 63 | ------------------- |
| 64 | |
| 65 | You should now have a functioning python. It is probably a good idea to run |
| 66 | "testall.py" from :Lib:test at this point, this should not give any errors. |
Jack Jansen | 8150760 | 1995-10-03 14:40:35 +0000 | [diff] [blame] | 67 | Running testall.py is done by double-clicking it or dropping it onto the |
| 68 | interpreter. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 69 | Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't |
| 70 | really important). |
| 71 | |
| 72 | PPC users have a couple of applets in the main folder they may want to try, |
| 73 | (68K users can use the corresponding scripts from the "scripts" folder): |
| 74 | |
| 75 | - EditPythonPrefs allows you to edit the preferences file, to change the |
| 76 | python home folder or modify the initial sys.path setting. |
Jack Jansen | ac0a21a | 1996-03-20 16:26:27 +0000 | [diff] [blame] | 77 | The default settings are "liberal", you can remove stdwin and tkinter if |
| 78 | you don't use them, and Mac:Lib:... if you don't have a source distribution. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 79 | - RunLibScript allows you to run any script as __main__ after setting arguments, |
| 80 | changing stdin/stdout/workdir, etc. |
| 81 | - For PPC only, mkapplet creates a python applet, a tiny application written |
| 82 | in python. Drop a python source on it and out comes the application. More |
| 83 | information can be found in the "Read me files" folder. |
| 84 | |
| 85 | PPC users will see one more files in the python folder: PythonApplet. This is |
| 86 | the template for building applets, leave it alone. |
| 87 | |
| 88 | Things to see |
| 89 | ------------- |
| 90 | |
| 91 | There are some readme files in the "Read me files" folder that may contain |
| 92 | useful information. Especially the Relnotes-1.3 file contains some interesting |
| 93 | tidbits. |
| 94 | |
| 95 | The "scripts" folder has some sample scripts. Some are useful, some are just |
| 96 | interesting to look at to see how various things work. The MkDistr, mkapplet |
| 97 | and fullbuild scripts (plus the ones mentioned above) may help you to understand |
| 98 | how to use AppleEvents and various other toolboxes from python. |
| 99 | |
| 100 | The Tools folder has all the (automatically generated) interfaces to toolboxes |
| 101 | available, and some simple test programs. See the scripts mentioned above for how |
| 102 | to use them. NOTE: the organization of the toolbox stuff is likely to change, |
| 103 | maybe even before the real 1.3 distribution. Until that time you will have to |
| 104 | use addpack or imp to import these files in your program. |
| 105 | |
| 106 | The 'img' group of modules, which handles I/O of many different image formats |
| 107 | (not pict yet, sigh:-) is included, but without documentation. You can find |
| 108 | docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 109 | |
| 110 | Feedback |
| 111 | -------- |
| 112 | |
| 113 | Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>. |
| 114 | Be warned however that I'm pretty busy at the moment, so I may not always |
| 115 | respond immedeately. |
| 116 | Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl, |
| 117 | but since I read the newsgroup, not the mailinglist, I may miss it there |
| 118 | (but other people may know quite a bit more than me anyway:-). |
| 119 | |
| 120 | Jack Jansen |
| 121 | Centrum voor Wiskunde en Informatica |
| 122 | Kruislaan 413 |
| 123 | 1098 SJ Amsterdam |
| 124 | the Netherlands |
| 125 | |
| 126 | <jack@cwi.nl>, http://www.cwi.nl/~jack |