blob: a9c2fb3b9dbc71cd068c9389c0035963e7cc15c6 [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
9"python preferences" file from the Preferences folder, and possibly
Jack Jansena1293da1996-08-28 13:51:11 +000010"PythonCore", "PythonCorePPC" and/or "PythonCoreCFM68K"
11from 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 Jansen05249f96f1995-09-01 11:49:11 +000044PowerPC Macintosh instructions
45------------------------------
46
Jack Jansena1293da1996-08-28 13:51:11 +0000471. Remove older versions of "PythonCorePPC", "PythonCore" and "Python Preferences"
Jack Jansen9bd2d971995-10-09 23:26:05 +000048 from your system folder.
Jack Jansen05249f96f1995-09-01 11:49:11 +000049
Jack Jansen9bd2d971995-10-09 23:26:05 +0000502. 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 Jansen86a853f1996-05-20 11:22:41 +000053 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 Jansen9bd2d971995-10-09 23:26:05 +000055
563. To make sure any applets you create can find the common interpreter code
Jack Jansena1293da1996-08-28 13:51:11 +000057 you should move PythonCorePPC to the Extensions folder (drop it on the
Jack Jansen59fcc5a1995-09-24 21:08:22 +000058 System Folder and it will find its own way). Alternatively, you can
Jack Jansena1293da1996-08-28 13:51:11 +000059 make an alias called "PythonCorePPC" in the Extensions folder and
60 point it to the real PythonCorePPC. You may want to start PythonPPC
Jack Jansen59fcc5a1995-09-24 21:08:22 +000061 again at this point to check that you actually put the extension in
62 the right place.
63
Jack Jansen9bd2d971995-10-09 23:26:05 +0000644. You're all set now. Continue with the common instructions.
Jack Jansen05249f96f1995-09-01 11:49:11 +000065
Jack Jansena1293da1996-08-28 13:51:11 +000066CFM68K Macintosh instructions
67-----------------------------
Jack Jansen05249f96f1995-09-01 11:49:11 +000068
Jack Jansena1293da1996-08-28 13:51:11 +000069For this you need a Mac with a 68020, 68030 or 68040, and at least System 7.1.1.
70CFM68K Python will not run on PowerPC Macs.
71
721. Install the stuff from the "CFM68K for System Folder" into the Extensions
73 folder and restart.
74
752. Continue with the PowerPC instructions, but read "CFM68K" every time you see
76 "PPC".
77
78Classic 68K Macintosh instructions
79----------------------------------
80
811. Remove the old "Python Preferences" file from the Preferences folder, if there is one.
Jack Jansen05249f96f1995-09-01 11:49:11 +000082
832. Run Python68K. This will create an initial preferences file (after
Jack Jansen9bd2d971995-10-09 23:26:05 +000084 asking you if that's ok with you). Quit python.
Jack Jansen05249f96f1995-09-01 11:49:11 +000085
863. Continue with the next section.
87
88Common instructions
89-------------------
90
91You 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 Jansen81507601995-10-03 14:40:35 +000093Running testall.py is done by double-clicking it or dropping it onto the
94interpreter.
Jack Jansen05249f96f1995-09-01 11:49:11 +000095Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't
96really important).
97
Jack Jansena1293da1996-08-28 13:51:11 +000098PPC and CFM68K users have a couple of applets in the main folder they may want to try,
Jack Jansen05249f96f1995-09-01 11:49:11 +000099(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 Jansena1293da1996-08-28 13:51:11 +0000103 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 Jansen05249f96f1995-09-01 11:49:11 +0000106 in python. Drop a python source on it and out comes the application. More
Jack Jansen86a853f1996-05-20 11:22:41 +0000107 information can be found in the "Mac:Demo" folder.
Jack Jansen05249f96f1995-09-01 11:49:11 +0000108
Jack Jansena1293da1996-08-28 13:51:11 +0000109PPC and CFM68K users will see one more files in the python folder: PythonApplet. This is
110the template for building applets, leave it alone. For the 1.4b3 release the applet is
111specific for your installation, i.e. PPC applets will not run on CFM68K machines and vice
112versa. I hope to fix this soon.
Jack Jansen05249f96f1995-09-01 11:49:11 +0000113
114Things to see
115-------------
116
117There are some readme files in the "Read me files" folder that may contain
Jack Jansen86a853f1996-05-20 11:22:41 +0000118useful information. There is also a first stab at documentation (plus examples)
119in the Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
120See the file Readme-mac for mac-specific notes. The Mac:Lib:test folder also
121has some programs that show simple capabilities of various modules.
Jack Jansen05249f96f1995-09-01 11:49:11 +0000122
123The "scripts" folder has some sample scripts. Some are useful, some are just
124interesting to look at to see how various things work. The MkDistr, mkapplet
125and fullbuild scripts (plus the ones mentioned above) may help you to understand
126how to use AppleEvents and various other toolboxes from python.
127
Jack Jansen05249f96f1995-09-01 11:49:11 +0000128The '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
130docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
131
132Feedback
133--------
134
135Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>.
Jack Jansena1293da1996-08-28 13:51:11 +0000136Be warned however that I'm pretty busy, so I may not always
Jack Jansen05249f96f1995-09-01 11:49:11 +0000137respond immedeately.
Jack Jansena1293da1996-08-28 13:51:11 +0000138
139A better way to discuss MacPython is to join the <pythonmac-sig@python.org>
140mailing list, which is explicitly meant for this purpose.
141
Jack Jansen05249f96f1995-09-01 11:49:11 +0000142Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl,
143but 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