blob: 2a966ff6966b094f4590f1949414f0a2bfe2af35 [file] [log] [blame]
Jack Jansena1293da1996-08-28 13:51:11 +00001How to install Python 1.4 on your Macintosh
Jack Jansen05249f96f1995-09-01 11:49:11 +00002------------------------------------------------
3
4Even if you don't usually read readme files: please read at least the
5first sections of this file, failure to do so will probably result in
6an unuseable python system. If this warning is too late and you already
7have an non-functional python: it is best to remove all traces and start
8with a fresh distribution. Especially don't forget to remove the
Jack Jansen2d359bf1996-10-22 15:29:58 +00009"python 1.4 preferences" file from the Preferences folder, and possibly
10"PythonCorePPC 1.4" and/or "PythonCoreCFM68K 1.4"
Jack Jansena1293da1996-08-28 13:51:11 +000011from the Extensions folder. Before you mail me for help *please*
Jack Jansen86a853f1996-05-20 11:22:41 +000012try the steps above (cleaning up and re-installing): it should fix most
Jack Jansena1293da1996-08-28 13:51:11 +000013common mistakes. If you are installing a CFM68K python also check that
14your installation of CFM68K was done correctly.
Jack Jansen05249f96f1995-09-01 11:49:11 +000015
Jack Jansen86a853f1996-05-20 11:22:41 +000016If this is your first encounter with Python: you definitely need the common
Jack Jansen05249f96f1995-09-01 11:49:11 +000017user documentation (common to all platforms). You can find this (in various
Jack Jansen59fcc5a1995-09-24 21:08:22 +000018forms) on www.python.org and ftp.python.org.
Jack Jansen05249f96f1995-09-01 11:49:11 +000019
Jack Jansen86a853f1996-05-20 11:22:41 +000020Mac-specific documentation is included in this distribution in folder Mac:Demo.
21The documentation is sparse, but it will have to serve for now. The documentation
22is in HTML format, start with index.html.
23
Jack Jansen05249f96f1995-09-01 11:49:11 +000024If you have a pre-system 7 macintosh: sorry, this release will not work
25on your system. Too many sys7 features are used to make a sys6 python
26easy to create. If you really want one: tell me, maybe I can be convinced.
27Alternatively: get the sources, put in the necessary gestalt() and
28compatability calls yourself and send me the results.
29
30If you don't have enough memory: the sizes choosen are somewhat arbitrary.
31Try lowering them and seeing whether the resulting python is still usable.
Jack Jansen81507601995-10-03 14:40:35 +000032Note, however, that python running out of memory may result in your mac
Jack Jansen4bffb8b1996-04-10 14:56:32 +000033freezing. If this happens I would like to hear of it.
34
35Note that if you're using Tk you might want to raise the memory size, tcl
36and tk are quite a memory hog.
Jack Jansen05249f96f1995-09-01 11:49:11 +000037
Jack Jansena1293da1996-08-28 13:51:11 +000038A final note to CFM68K (and possibly PPC) users: the Code Fragment Manager
39can (incorrectly) produce "library not found" and other strange error messages
40when 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
42may solve these problems.
43
Jack Jansen2d359bf1996-10-22 15:29:58 +000044PowerPC and CFM68K Macintosh instructions
45-----------------------------------------
Jack Jansen05249f96f1995-09-01 11:49:11 +000046
Jack Jansen2d359bf1996-10-22 15:29:58 +000047For CFM68K you need a Mac with a 68020, 68030 or 68040, and at least System 7.1.1.
48CFM68K Python will not run on PowerPC Macs. Before installing Python you
49should install CFM68K. Put everything from the "CFM68K for System Folder" into the
50Extensions folder and restart.
51
52Run the MkPluginAliases applet. This will create an initial preferences file.
53Next, it will create a number of aliases in the PlugIns folder. Finally
54it will put an alias to your PythonCore in the Extensions folder. The whole
55process should be independent of any previous releases of Python on your disk
56(and these releases should still continue working).
Jack Jansen05249f96f1995-09-01 11:49:11 +000057
Jack Jansen2d359bf1996-10-22 15:29:58 +000058For all these things to work correctly it is vital that you don't move anything
59around before running MkPluginAliases. After you have set things up you may
60move things around to your hearts' desire.
Jack Jansena1293da1996-08-28 13:51:11 +000061
62Classic 68K Macintosh instructions
63----------------------------------
64
Jack Jansen2d359bf1996-10-22 15:29:58 +000065Run Python68K. This will create an initial preferences file. Quit python.
Jack Jansen05249f96f1995-09-01 11:49:11 +000066
67Common instructions
68-------------------
69
70You 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 Jansen81507601995-10-03 14:40:35 +000072Running testall.py is done by double-clicking it or dropping it onto the
73interpreter.
Jack Jansen05249f96f1995-09-01 11:49:11 +000074Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't
75really important).
76
Jack Jansena1293da1996-08-28 13:51:11 +000077PPC and CFM68K users have a couple of applets in the main folder they may want to try,
Jack Jansen05249f96f1995-09-01 11:49:11 +000078(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 Jansena1293da1996-08-28 13:51:11 +000082 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 Jansen05249f96f1995-09-01 11:49:11 +000085 in python. Drop a python source on it and out comes the application. More
Jack Jansen86a853f1996-05-20 11:22:41 +000086 information can be found in the "Mac:Demo" folder.
Jack Jansen05249f96f1995-09-01 11:49:11 +000087
Jack Jansena1293da1996-08-28 13:51:11 +000088PPC and CFM68K users will see one more files in the python folder: PythonApplet. This is
89the template for building applets, leave it alone. For the 1.4b3 release the applet is
90specific for your installation, i.e. PPC applets will not run on CFM68K machines and vice
91versa. I hope to fix this soon.
Jack Jansen05249f96f1995-09-01 11:49:11 +000092
93Things to see
94-------------
95
96There are some readme files in the "Read me files" folder that may contain
Jack Jansen86a853f1996-05-20 11:22:41 +000097useful information. There is also a first stab at documentation (plus examples)
98in the Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
99See the file Readme-mac for mac-specific notes. The Mac:Lib:test folder also
100has some programs that show simple capabilities of various modules.
Jack Jansen05249f96f1995-09-01 11:49:11 +0000101
102The "scripts" folder has some sample scripts. Some are useful, some are just
103interesting to look at to see how various things work. The MkDistr, mkapplet
104and fullbuild scripts (plus the ones mentioned above) may help you to understand
105how to use AppleEvents and various other toolboxes from python.
106
Jack Jansen05249f96f1995-09-01 11:49:11 +0000107The '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
109docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
110
Jack Jansen2d359bf1996-10-22 15:29:58 +0000111Upgrading from older Python releases
112------------------------------------
113
114Since release 1.4 Python releases are independent of each other, with separate
115Preferences files, shared library names, etc. The good news is that this means you
116can keep your older version around if you are unsure whether to upgrade. The bad
117news is that your old preference settings are lost and you have to set them again.
118
119After you are satisfied that 1.4 works as expected you can trash anything in the
120system folder that has "python" in the name and not "1.4".
121
Jack Jansen05249f96f1995-09-01 11:49:11 +0000122Feedback
123--------
124
125Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>.
Jack Jansena1293da1996-08-28 13:51:11 +0000126Be warned however that I'm pretty busy, so I may not always
Jack Jansen05249f96f1995-09-01 11:49:11 +0000127respond immedeately.
Jack Jansena1293da1996-08-28 13:51:11 +0000128
129A better way to discuss MacPython is to join the <pythonmac-sig@python.org>
130mailing list, which is explicitly meant for this purpose.
131
Jack Jansen05249f96f1995-09-01 11:49:11 +0000132Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl,
133but 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