Jack Jansen | 05249f96f | 1995-09-01 11:49:11 +0000 | [diff] [blame] | 1 | How to install Python 1.3beta3 on your Macintosh |
| 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 |
| 10 | "PythonCore" from the Extensions folder. |
| 11 | |
| 12 | Next: this is a beta distribution, so (a) things may be broken and (b) |
| 13 | the instructions are probably far from complete (or correct:-). I'm counting |
| 14 | on you to send me feedback on any problems you encounter or suggestions |
| 15 | you have! |
| 16 | |
| 17 | If this is your first encounter with python: you definitely need the common |
| 18 | user documentation (common to all platforms). You can find this (in various |
| 19 | forms) on www.python.com and ftp.python.com. |
| 20 | |
| 21 | If you have a pre-system 7 macintosh: sorry, this release will not work |
| 22 | on your system. Too many sys7 features are used to make a sys6 python |
| 23 | easy to create. If you really want one: tell me, maybe I can be convinced. |
| 24 | Alternatively: get the sources, put in the necessary gestalt() and |
| 25 | compatability calls yourself and send me the results. |
| 26 | |
| 27 | If you don't have enough memory: the sizes choosen are somewhat arbitrary. |
| 28 | Try lowering them and seeing whether the resulting python is still usable. |
| 29 | |
| 30 | PowerPC Macintosh instructions |
| 31 | ------------------------------ |
| 32 | |
| 33 | 1. You will have to create some aliases in the 'PlugIns' folder. There is |
| 34 | an AppleScript there that will create them for you. If you don't have |
| 35 | AppleScript you will have to create the aliases by hand, read the script |
| 36 | to see what to do. Alternatively, if you have still have an older, but |
| 37 | fairly recent version of python already on your system: try the |
| 38 | MkPluginAliases script from the Scripts folder. |
| 39 | |
| 40 | [If someone nows of a way to create relative aliases or of a simple way |
| 41 | to create aliases on a target system without knowing pathnames in advance: |
| 42 | please let me know] |
| 43 | |
| 44 | 2. At this point you should remove older versions of "PythonCore" and |
| 45 | "Python Preferences" from your system folder. |
| 46 | |
| 47 | 3. Next, you should run PythonPPC. This will create an initial preferences |
| 48 | file (after asking you if that's ok with you). |
| 49 | |
| 50 | 4. To make sure any applets you create can find the common interpreter code |
| 51 | you should make an alias to PythonCore and drop it in your Extensions |
| 52 | folder (I think the name should still be PythonCore). Alternatively, drop |
| 53 | the file itself on the System folder and it will find its own way. |
| 54 | |
| 55 | 5. You're all set now. Continue with the common instructions. |
| 56 | |
| 57 | 68K Macintosh instructions |
| 58 | -------------------------- |
| 59 | |
| 60 | 1. Remove old "Python Preferences" file from the Preferences folder, if you |
| 61 | have one (the file, that is, not the folder:-). |
| 62 | |
| 63 | 2. Run Python68K. This will create an initial preferences file (after |
| 64 | asking you if that's ok with you). |
| 65 | |
| 66 | 3. Continue with the next section. |
| 67 | |
| 68 | Common instructions |
| 69 | ------------------- |
| 70 | |
| 71 | You should now have a functioning python. It is probably a good idea to run |
| 72 | "testall.py" from :Lib:test at this point, this should not give any errors. |
| 73 | Next, try "compileall.py" from :Lib to create all .pyc files (but this isn't |
| 74 | really important). |
| 75 | |
| 76 | PPC users have a couple of applets in the main folder they may want to try, |
| 77 | (68K users can use the corresponding scripts from the "scripts" folder): |
| 78 | |
| 79 | - EditPythonPrefs allows you to edit the preferences file, to change the |
| 80 | python home folder or modify the initial sys.path setting. |
| 81 | - 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 | |
| 87 | PPC users will see one more files in the python folder: PythonApplet. This is |
| 88 | the template for building applets, leave it alone. |
| 89 | |
| 90 | Things to see |
| 91 | ------------- |
| 92 | |
| 93 | There are some readme files in the "Read me files" folder that may contain |
| 94 | useful information. Especially the Relnotes-1.3 file contains some interesting |
| 95 | tidbits. |
| 96 | |
| 97 | The "scripts" folder has some sample scripts. Some are useful, some are just |
| 98 | interesting to look at to see how various things work. The MkDistr, mkapplet |
| 99 | and fullbuild scripts (plus the ones mentioned above) may help you to understand |
| 100 | how to use AppleEvents and various other toolboxes from python. |
| 101 | |
| 102 | The Tools folder has all the (automatically generated) interfaces to toolboxes |
| 103 | available, and some simple test programs. See the scripts mentioned above for how |
| 104 | to use them. NOTE: the organization of the toolbox stuff is likely to change, |
| 105 | maybe even before the real 1.3 distribution. Until that time you will have to |
| 106 | use addpack or imp to import these files in your program. |
| 107 | |
| 108 | The '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 |
| 110 | docs at ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there). |
| 111 | |
| 112 | Feedback |
| 113 | -------- |
| 114 | |
| 115 | Send bug reports, suggestions, contributions and fanmail to <jack@cwi.nl>. |
| 116 | Be warned however that I'm pretty busy at the moment, so I may not always |
| 117 | respond immedeately. |
| 118 | Alternatively, you can try sending to comp.lang.python or python-list@cwi.nl, |
| 119 | but 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 |