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 |
Jack Jansen | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 9 | "python 1.4 preferences" file from the Preferences folder, and possibly |
| 10 | "PythonCorePPC 1.4" and/or "PythonCoreCFM68K 1.4" |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 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 | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 44 | PowerPC and CFM68K Macintosh instructions |
| 45 | ----------------------------------------- |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 46 | |
Jack Jansen | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 47 | For CFM68K you need a Mac with a 68020, 68030 or 68040, and at least System 7.1.1. |
| 48 | CFM68K Python will not run on PowerPC Macs. Before installing Python you |
| 49 | should install CFM68K. Put everything from the "CFM68K for System Folder" into the |
| 50 | Extensions folder and restart. |
| 51 | |
| 52 | Run the MkPluginAliases applet. This will create an initial preferences file. |
| 53 | Next, it will create a number of aliases in the PlugIns folder. Finally |
| 54 | it will put an alias to your PythonCore in the Extensions folder. The whole |
| 55 | process should be independent of any previous releases of Python on your disk |
| 56 | (and these releases should still continue working). |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 57 | |
Jack Jansen | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 58 | For all these things to work correctly it is vital that you don't move anything |
| 59 | around before running MkPluginAliases. After you have set things up you may |
| 60 | move things around to your hearts' desire. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 61 | |
| 62 | Classic 68K Macintosh instructions |
| 63 | ---------------------------------- |
| 64 | |
Jack Jansen | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 65 | Run Python68K. This will create an initial preferences file. Quit python. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 66 | |
| 67 | Common instructions |
| 68 | ------------------- |
| 69 | |
| 70 | You should now have a functioning python. It is probably a good idea to run |
| 71 | "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] | 72 | Running testall.py is done by double-clicking it or dropping it onto the |
| 73 | interpreter. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 74 | Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't |
| 75 | really important). |
| 76 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 77 | 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] | 78 | (68K users can use the corresponding scripts from the "scripts" folder): |
| 79 | |
| 80 | - EditPythonPrefs allows you to edit the preferences file, to change the |
| 81 | python home folder or modify the initial sys.path setting. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 82 | The default settings are somewhat arbitrary, you can remove tkinter if |
| 83 | you don't use it and possibly add Extensions:img:Lib. |
| 84 | - mkapplet creates a python applet, a tiny application written |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 85 | 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] | 86 | information can be found in the "Mac:Demo" folder. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 87 | |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 88 | PPC and CFM68K users will see one more files in the python folder: PythonApplet. This is |
| 89 | the template for building applets, leave it alone. For the 1.4b3 release the applet is |
| 90 | specific for your installation, i.e. PPC applets will not run on CFM68K machines and vice |
| 91 | versa. I hope to fix this soon. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 92 | |
| 93 | Things to see |
| 94 | ------------- |
| 95 | |
| 96 | 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] | 97 | useful information. There is also a first stab at documentation (plus examples) |
| 98 | in the Mac:Demo folder. The toplevel Demo folder has machine-independent demos. |
| 99 | See the file Readme-mac for mac-specific notes. The Mac:Lib:test folder also |
| 100 | has some programs that show simple capabilities of various modules. |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 101 | |
| 102 | The "scripts" folder has some sample scripts. Some are useful, some are just |
| 103 | interesting to look at to see how various things work. The MkDistr, mkapplet |
| 104 | and fullbuild scripts (plus the ones mentioned above) may help you to understand |
| 105 | how to use AppleEvents and various other toolboxes from python. |
| 106 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 107 | The 'img' group of modules, which handles I/O of many different image formats |
| 108 | (not pict yet, sigh:-) is included, but without documentation. You can find |
| 109 | docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 110 | |
Jack Jansen | 2d359bf | 1996-10-22 15:29:58 +0000 | [diff] [blame] | 111 | Upgrading from older Python releases |
| 112 | ------------------------------------ |
| 113 | |
| 114 | Since release 1.4 Python releases are independent of each other, with separate |
| 115 | Preferences files, shared library names, etc. The good news is that this means you |
| 116 | can keep your older version around if you are unsure whether to upgrade. The bad |
| 117 | news is that your old preference settings are lost and you have to set them again. |
| 118 | |
| 119 | After you are satisfied that 1.4 works as expected you can trash anything in the |
| 120 | system folder that has "python" in the name and not "1.4". |
| 121 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 122 | Feedback |
| 123 | -------- |
| 124 | |
| 125 | Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 126 | 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] | 127 | respond immedeately. |
Jack Jansen | a1293da | 1996-08-28 13:51:11 +0000 | [diff] [blame] | 128 | |
| 129 | A better way to discuss MacPython is to join the <pythonmac-sig@python.org> |
| 130 | mailing list, which is explicitly meant for this purpose. |
| 131 | |
Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 132 | Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl, |
| 133 | but since I read the newsgroup, not the mailinglist, I may miss it there |
| 134 | (but other people may know quite a bit more than me anyway:-). |
| 135 | |
| 136 | Jack Jansen |
| 137 | Centrum voor Wiskunde en Informatica |
| 138 | Kruislaan 413 |
| 139 | 1098 SJ Amsterdam |
| 140 | the Netherlands |
| 141 | |
| 142 | <jack@cwi.nl>, http://www.cwi.nl/~jack |