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