Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 1 | How to install Python 1.4 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 | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 10 | "PythonCore", "PythonCorePPC" and/or "PythonCoreCFM68K" |
| 11 | from the Extensions folder. Before you mail me for help *please* |
Jack Jansen | 86a853f | 1996-05-20 11:22:41 +0000 | [diff] [blame] | 12 | try the steps above (cleaning up and re-installing): it should fix most |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 13 | common mistakes. If you are installing a CFM68K python also check that |
| 14 | your installation of CFM68K was done correctly. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 15 | |
Jack Jansen | 86a853f | 1996-05-20 11:22:41 +0000 | [diff] [blame] | 16 | 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] | 17 | user documentation (common to all platforms). You can find this (in various |
Jack Jansen | 59fcc5a | 1995-09-24 21:08:22 +0000 | [diff] [blame] | 18 | forms) on www.python.org and ftp.python.org. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 19 | |
Jack Jansen | 86a853f | 1996-05-20 11:22:41 +0000 | [diff] [blame] | 20 | Mac-specific documentation is included in this distribution in folder Mac:Demo. |
| 21 | The documentation is sparse, but it will have to serve for now. The documentation |
| 22 | is in HTML format, start with index.html. |
| 23 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 24 | If you have a pre-system 7 macintosh: sorry, this release will not work |
| 25 | on your system. Too many sys7 features are used to make a sys6 python |
| 26 | easy to create. If you really want one: tell me, maybe I can be convinced. |
| 27 | Alternatively: get the sources, put in the necessary gestalt() and |
| 28 | compatability calls yourself and send me the results. |
| 29 | |
| 30 | If you don't have enough memory: the sizes choosen are somewhat arbitrary. |
| 31 | Try lowering them and seeing whether the resulting python is still usable. |
Jack Jansen | 8150760 | 1995-10-03 14:40:35 +0000 | [diff] [blame] | 32 | 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] | 33 | freezing. If this happens I would like to hear of it. |
| 34 | |
| 35 | Note that if you're using Tk you might want to raise the memory size, tcl |
| 36 | and tk are quite a memory hog. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 37 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 38 | A final note to CFM68K (and possibly PPC) users: the Code Fragment Manager |
| 39 | can (incorrectly) produce "library not found" and other strange error messages |
| 40 | when it really means that there is not enough room in the system heap. Decreasing |
| 41 | (yes, *de*creasing) the size of the interpreter and/or enabling virtual memory |
| 42 | may solve these problems. |
| 43 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 44 | PowerPC Macintosh instructions |
| 45 | ------------------------------ |
| 46 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 47 | 1. Remove older versions of "PythonCorePPC", "PythonCore" and "Python Preferences" |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 48 | from your system folder. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 49 | |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 50 | 2. Run the MkPluginAliases applet. This will first ask you whether it should |
| 51 | create an initial preferences file. Let it do so. Next, it will create a |
| 52 | 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] | 53 | examine the script (in Mac:scripts:MkPluginAliases.py) and create the aliases |
| 54 | 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] | 55 | |
| 56 | 3. To make sure any applets you create can find the common interpreter code |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 57 | you should move PythonCorePPC to the Extensions folder (drop it on the |
Jack Jansen | 59fcc5a | 1995-09-24 21:08:22 +0000 | [diff] [blame] | 58 | System Folder and it will find its own way). Alternatively, you can |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 59 | make an alias called "PythonCorePPC" in the Extensions folder and |
| 60 | point it to the real PythonCorePPC. You may want to start PythonPPC |
Jack Jansen | 59fcc5a | 1995-09-24 21:08:22 +0000 | [diff] [blame] | 61 | again at this point to check that you actually put the extension in |
| 62 | the right place. |
| 63 | |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 64 | 4. You're all set now. Continue with the common instructions. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 65 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 66 | CFM68K Macintosh instructions |
| 67 | ----------------------------- |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 68 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 69 | For this you need a Mac with a 68020, 68030 or 68040, and at least System 7.1.1. |
| 70 | CFM68K Python will not run on PowerPC Macs. |
| 71 | |
| 72 | 1. Install the stuff from the "CFM68K for System Folder" into the Extensions |
| 73 | folder and restart. |
| 74 | |
| 75 | 2. Continue with the PowerPC instructions, but read "CFM68K" every time you see |
| 76 | "PPC". |
| 77 | |
| 78 | Classic 68K Macintosh instructions |
| 79 | ---------------------------------- |
| 80 | |
| 81 | 1. Remove the old "Python Preferences" file from the Preferences folder, if there is one. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 82 | |
| 83 | 2. Run Python68K. This will create an initial preferences file (after |
Jack Jansen | 9bd2d97 | 1995-10-09 23:26:05 +0000 | [diff] [blame] | 84 | asking you if that's ok with you). Quit python. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 85 | |
| 86 | 3. Continue with the next section. |
| 87 | |
| 88 | Common instructions |
| 89 | ------------------- |
| 90 | |
| 91 | You should now have a functioning python. It is probably a good idea to run |
| 92 | "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] | 93 | Running testall.py is done by double-clicking it or dropping it onto the |
| 94 | interpreter. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 95 | Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't |
| 96 | really important). |
| 97 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 98 | PPC and CFM68K users have a couple of applets in the main folder they may want to try, |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 99 | (68K users can use the corresponding scripts from the "scripts" folder): |
| 100 | |
| 101 | - EditPythonPrefs allows you to edit the preferences file, to change the |
| 102 | python home folder or modify the initial sys.path setting. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 103 | The default settings are somewhat arbitrary, you can remove tkinter if |
| 104 | you don't use it and possibly add Extensions:img:Lib. |
| 105 | - mkapplet creates a python applet, a tiny application written |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 106 | 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] | 107 | information can be found in the "Mac:Demo" folder. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 108 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 109 | PPC and CFM68K users will see one more files in the python folder: PythonApplet. This is |
| 110 | the template for building applets, leave it alone. For the 1.4b3 release the applet is |
| 111 | specific for your installation, i.e. PPC applets will not run on CFM68K machines and vice |
| 112 | versa. I hope to fix this soon. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 113 | |
| 114 | Things to see |
| 115 | ------------- |
| 116 | |
| 117 | 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] | 118 | useful information. There is also a first stab at documentation (plus examples) |
| 119 | in the Mac:Demo folder. The toplevel Demo folder has machine-independent demos. |
| 120 | See the file Readme-mac for mac-specific notes. The Mac:Lib:test folder also |
| 121 | has some programs that show simple capabilities of various modules. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 122 | |
| 123 | The "scripts" folder has some sample scripts. Some are useful, some are just |
| 124 | interesting to look at to see how various things work. The MkDistr, mkapplet |
| 125 | and fullbuild scripts (plus the ones mentioned above) may help you to understand |
| 126 | how to use AppleEvents and various other toolboxes from python. |
| 127 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 128 | The 'img' group of modules, which handles I/O of many different image formats |
| 129 | (not pict yet, sigh:-) is included, but without documentation. You can find |
| 130 | docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 131 | |
| 132 | Feedback |
| 133 | -------- |
| 134 | |
| 135 | Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 136 | Be warned however that I'm pretty busy, so I may not always |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 137 | respond immedeately. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame^] | 138 | |
| 139 | A better way to discuss MacPython is to join the <pythonmac-sig@python.org> |
| 140 | mailing list, which is explicitly meant for this purpose. |
| 141 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 142 | Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl, |
| 143 | but since I read the newsgroup, not the mailinglist, I may miss it there |
| 144 | (but other people may know quite a bit more than me anyway:-). |
| 145 | |
| 146 | Jack Jansen |
| 147 | Centrum voor Wiskunde en Informatica |
| 148 | Kruislaan 413 |
| 149 | 1098 SJ Amsterdam |
| 150 | the Netherlands |
| 151 | |
| 152 | <jack@cwi.nl>, http://www.cwi.nl/~jack |