blob: ac390d02c4821dd1ee52dc360f7aa772a44d8276 [file] [log] [blame]
Jack Jansen9bd2d971995-10-09 23:26:05 +00001How to install Python 1.3 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
10"PythonCore" from the Extensions folder.
11
Jack Jansen05249f96f1995-09-01 11:49:11 +000012If this is your first encounter with python: you definitely need the common
13user documentation (common to all platforms). You can find this (in various
Jack Jansen59fcc5a1995-09-24 21:08:22 +000014forms) on www.python.org and ftp.python.org.
Jack Jansen05249f96f1995-09-01 11:49:11 +000015
16If you have a pre-system 7 macintosh: sorry, this release will not work
17on your system. Too many sys7 features are used to make a sys6 python
18easy to create. If you really want one: tell me, maybe I can be convinced.
19Alternatively: get the sources, put in the necessary gestalt() and
20compatability calls yourself and send me the results.
21
22If you don't have enough memory: the sizes choosen are somewhat arbitrary.
23Try lowering them and seeing whether the resulting python is still usable.
Jack Jansen81507601995-10-03 14:40:35 +000024Note, however, that python running out of memory may result in your mac
Jack Jansen4bffb8b1996-04-10 14:56:32 +000025freezing. If this happens I would like to hear of it.
26
27Note that if you're using Tk you might want to raise the memory size, tcl
28and tk are quite a memory hog.
Jack Jansen05249f96f1995-09-01 11:49:11 +000029
30PowerPC Macintosh instructions
31------------------------------
32
Jack Jansen9bd2d971995-10-09 23:26:05 +0000331. Remove older versions of "PythonCore" and "Python Preferences"
34 from your system folder.
Jack Jansen05249f96f1995-09-01 11:49:11 +000035
Jack Jansen9bd2d971995-10-09 23:26:05 +0000362. Run the MkPluginAliases applet. This will first ask you whether it should
37 create an initial preferences file. Let it do so. Next, it will create a
38 number of aliases in the PlugIns folder. If this fails in mysterious ways
39 try using the applescript in the PlugIns folder to create the aliases.
40 If that also fails: examine the script and create the aliases by hand
41 (and tell me what you did to make either of these two fail:-).
42
433. To make sure any applets you create can find the common interpreter code
Jack Jansen59fcc5a1995-09-24 21:08:22 +000044 you should move PythonCore to the Extensions folder (drop it on the
45 System Folder and it will find its own way). Alternatively, you can
46 make an alias called "PythonCore" in the Extensions folder and
47 point it to the real PythonCore. You may want to start PythonPPC
48 again at this point to check that you actually put the extension in
49 the right place.
50
Jack Jansen9bd2d971995-10-09 23:26:05 +0000514. You're all set now. Continue with the common instructions.
Jack Jansen05249f96f1995-09-01 11:49:11 +000052
5368K Macintosh instructions
54--------------------------
55
561. Remove old "Python Preferences" file from the Preferences folder, if you
57 have one (the file, that is, not the folder:-).
58
592. Run Python68K. This will create an initial preferences file (after
Jack Jansen9bd2d971995-10-09 23:26:05 +000060 asking you if that's ok with you). Quit python.
Jack Jansen05249f96f1995-09-01 11:49:11 +000061
623. Continue with the next section.
63
64Common instructions
65-------------------
66
67You should now have a functioning python. It is probably a good idea to run
68"testall.py" from :Lib:test at this point, this should not give any errors.
Jack Jansen81507601995-10-03 14:40:35 +000069Running testall.py is done by double-clicking it or dropping it onto the
70interpreter.
Jack Jansen05249f96f1995-09-01 11:49:11 +000071Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't
72really important).
73
74PPC users have a couple of applets in the main folder they may want to try,
75(68K users can use the corresponding scripts from the "scripts" folder):
76
77- EditPythonPrefs allows you to edit the preferences file, to change the
78 python home folder or modify the initial sys.path setting.
Jack Jansenac0a21a1996-03-20 16:26:27 +000079 The default settings are "liberal", you can remove stdwin and tkinter if
80 you don't use them, and Mac:Lib:... if you don't have a source distribution.
Jack Jansen05249f96f1995-09-01 11:49:11 +000081- RunLibScript allows you to run any script as __main__ after setting arguments,
82 changing stdin/stdout/workdir, etc.
83- For PPC only, mkapplet creates a python applet, a tiny application written
84 in python. Drop a python source on it and out comes the application. More
85 information can be found in the "Read me files" folder.
86
87PPC users will see one more files in the python folder: PythonApplet. This is
88the template for building applets, leave it alone.
89
90Things to see
91-------------
92
93There are some readme files in the "Read me files" folder that may contain
94useful information. Especially the Relnotes-1.3 file contains some interesting
95tidbits.
96
97The "scripts" folder has some sample scripts. Some are useful, some are just
98interesting to look at to see how various things work. The MkDistr, mkapplet
99and fullbuild scripts (plus the ones mentioned above) may help you to understand
100how to use AppleEvents and various other toolboxes from python.
101
102The Tools folder has all the (automatically generated) interfaces to toolboxes
103available, and some simple test programs. See the scripts mentioned above for how
104to use them. NOTE: the organization of the toolbox stuff is likely to change,
105maybe even before the real 1.3 distribution. Until that time you will have to
106use addpack or imp to import these files in your program.
107
108The 'img' group of modules, which handles I/O of many different image formats
109(not pict yet, sigh:-) is included, but without documentation. You can find
110docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
111
112Feedback
113--------
114
115Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>.
116Be warned however that I'm pretty busy at the moment, so I may not always
117respond immedeately.
118Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl,
119but since I read the newsgroup, not the mailinglist, I may miss it there
120(but other people may know quite a bit more than me anyway:-).
121
122 Jack Jansen
123 Centrum voor Wiskunde en Informatica
124 Kruislaan 413
125 1098 SJ Amsterdam
126 the Netherlands
127
128 <jack@cwi.nl>, http://www.cwi.nl/~jack