2003-01-08 12:27:44 -04:00
|
|
|
How to install MacPython-OS9 2.3a1 on your Macintosh
|
|
|
|
----------------------------------------------------
|
2001-02-17 18:03:42 -04:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
This is a MacPython that can run on Mac OS 8.6 with CarbonLib
|
|
|
|
installed, Mac OS 9 and Mac OS X. It is the direct successor of MacPython 2.2.
|
2001-02-17 18:03:42 -04:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
For Mac OS X users: you are probably better off with the normal unix distribution
|
|
|
|
of Python. That version also runs from the commandline, and if you do a framework
|
|
|
|
build it will contain all the functionality of this version too. A prebuilt
|
|
|
|
version will be available starting with the beta distributions.
|
2001-02-17 18:03:42 -04:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
If you are upgrading from a previous MacPython you should read :Misc:NEWS,
|
|
|
|
which lists the new features of this Python release. As of this release
|
|
|
|
the Mac-specific release notes have been moved to the "Mac" section of
|
|
|
|
the general NEWS file.
|
|
|
|
|
|
|
|
Two changes since 2.2 deserve special mention:
|
|
|
|
- Most Mac-specific modules have moved to :Lib:plat-mac. :Mac:Lib now contains
|
|
|
|
only modules that are not shared with MacPython-OSX 2.3.
|
|
|
|
- macfs is now a pure Python wrapper module around various modules in the
|
|
|
|
Carbon package. For 2.3a1 only this wrapping is incomplete: fsspec.SetDates()
|
|
|
|
does not work yet. If you encounter any other problems please report them.
|
2001-03-15 10:27:09 -04:00
|
|
|
|
2001-02-17 18:03:42 -04:00
|
|
|
------
|
1997-08-26 10:25:06 -03:00
|
|
|
|
|
|
|
If this is your first encounter with Python: you definitely need the
|
|
|
|
common user documentation (common to all platforms). You can find this
|
2000-10-19 18:58:27 -03:00
|
|
|
(in various forms) on www.pythonlabs.com, www.python.org and
|
|
|
|
ftp.python.org. Through there, or via
|
|
|
|
http://www.cwi.nl/~jack/macpython.html you can also find the most recent
|
|
|
|
MacPython distribution.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
|
|
|
Mac-specific documentation is included in this distribution in folder
|
|
|
|
Mac:Demo. The documentation is sparse, but it will have to serve for
|
|
|
|
now. The documentation is in HTML format, start with index.html.
|
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
If you want a MacPython that runs on systems without Carbon support (8.1
|
|
|
|
up to 8.6 without CarbonLib) you should get MacPython 2.2.2.
|
1998-01-06 08:13:16 -04:00
|
|
|
|
2001-12-27 19:01:18 -04:00
|
|
|
If you want 68k support you will have get MacPython 1.5.2.
|
2000-09-14 17:58:24 -03:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
What to install
|
|
|
|
---------------
|
|
|
|
|
2000-05-06 20:01:07 -03:00
|
|
|
The optional parts in this distribution are
|
2003-01-08 12:27:44 -04:00
|
|
|
- PIL: the Python image manipulation package (allows you to read, write
|
|
|
|
and display images and do lots of operations on them). Tkinter is no
|
|
|
|
longer supported, a working Carbon version is Tk is not available.
|
2000-05-06 20:01:07 -03:00
|
|
|
- img: another imaging package. Has more file format support and is faster
|
|
|
|
than imaging, but has only limited operations on images. There is a bridge
|
|
|
|
between the packages.
|
|
|
|
- Numeric: the LLNL Numeric Python extension. All sorts of nifty operations
|
2003-01-08 12:27:44 -04:00
|
|
|
on matrices and such. This is version 22.
|
2001-10-31 06:13:52 -04:00
|
|
|
- Developers kit: all header files and some tools and sample projects
|
|
|
|
to get you started on writing Python extensions if you have CodeWarrior.
|
2000-05-06 20:01:07 -03:00
|
|
|
All these except the DevKit are installed with Easy Install.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
After the installer finishes it automatically launches the
|
|
|
|
ConfigurePython applet, to finish configuration of your Python.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
Moving your Python installation after installing is generally not a
|
|
|
|
good idea. If you have to do this anyway you should remove your
|
|
|
|
preference file, run ConfigurePython and remove all .pyc
|
|
|
|
files. (there's a script zappyc.py that does the latter).
|
2000-11-14 16:37:37 -04:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
If you don't have enough memory: the sizes choosen are somewhat
|
2001-10-31 06:13:52 -04:00
|
|
|
arbitrary, and they are as high as they are so that test.autotest runs
|
|
|
|
with fewer problems. An average Python program can make do with much
|
|
|
|
less memory. Try lowering the application sizes in the finder "get
|
|
|
|
info" window, and seeing whether the resulting python is still usable.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
|
|
|
After installing
|
|
|
|
----------------
|
|
|
|
|
2000-09-10 09:02:28 -03:00
|
|
|
It is probably a good idea to run the automatic tests. Start
|
2001-09-08 18:38:26 -03:00
|
|
|
Python and "import test.regrtest ; test.regrtest.main()".
|
2000-10-12 18:21:43 -03:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
test_httplib fails with an unexpected output error,
|
|
|
|
this problem is being investigated.
|
|
|
|
|
|
|
|
test_socket fails, this problem is being investigated.
|
2001-11-30 10:16:36 -04:00
|
|
|
|
2001-09-08 18:38:26 -03:00
|
|
|
Three tests will fail on MacOS9 with MemoryErrors:
|
2001-10-23 19:22:09 -03:00
|
|
|
test_longexp, test_sha and test_zlib (on MacOSX these should pass).
|
2001-03-27 17:38:55 -04:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
If you increase the PythonInterpreter memory partition size they will
|
|
|
|
pass (but for longexp you have to increase it by an incredible amount,
|
|
|
|
400MB is rumoured). It will, however, print some messages about
|
|
|
|
optional features not supported. You should not worry about these,
|
|
|
|
they are modules that are supported by Python on other
|
|
|
|
platforms. Also, if you didn't run compileall before autotesting you
|
|
|
|
may run out of memory the first time you run the tests. test_socket
|
|
|
|
may also fail if you have no internet connection. Please also read the
|
|
|
|
Relnotes file for other minor problems with this distribution.
|
|
|
|
|
|
|
|
Using Python is most easily done from the IDE, which has a builtin
|
|
|
|
editor, debugger and other goodies. The alternative is to use
|
|
|
|
PythonInterpreter, which is the lowlevel interpreter with a
|
|
|
|
console-window only (similar to Unix Python).
|
|
|
|
|
|
|
|
If your program uses Tkinter you MUST run it under PythonInterpreter,
|
|
|
|
Tkinter and IDE are incompatible and your program will fail in strange
|
|
|
|
ways.
|
2000-09-10 09:02:28 -03:00
|
|
|
|
2002-04-23 16:50:53 -03:00
|
|
|
OSX Multiple users note
|
|
|
|
-----------------------
|
|
|
|
|
|
|
|
Interaction with Mac OS X multiple users has been tested only very lightly.
|
|
|
|
If you install as a privileged user everything installs fine.
|
|
|
|
|
|
|
|
If you install as a non-privileged user everything should install in your local
|
|
|
|
per-user folders. But: as there is no global PythonCore you can only run applets
|
|
|
|
if they reside in your toplevel Python folder.
|
|
|
|
|
|
|
|
If you install as a privileged user and then try to run
|
|
|
|
Python as another (non-privileged) user you may encounter a problem with
|
|
|
|
not having a preference file: the symptom is failing to import all sorts
|
|
|
|
of standard modules. If you remove your per-user Python preference files
|
2003-01-08 12:27:44 -04:00
|
|
|
(in ~/Library/Preferences) and then run PythonInterpreter once everything should
|
2002-04-23 16:50:53 -03:00
|
|
|
be fine.
|
|
|
|
|
1997-10-08 12:34:42 -03:00
|
|
|
Uninstalling
|
|
|
|
------------
|
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
Up to three items are installed in the MacOS 8 or 9 system folder: the interpreter
|
|
|
|
shared library PythonCore lives in the Extensions
|
|
|
|
folder and the "Python 2.3a1 Preferences" file in the Python subfolder
|
2001-10-31 06:13:52 -04:00
|
|
|
in the Preferences folder. All the rest of Python lives in the folder
|
|
|
|
you installed in.
|
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
On OSX the library is installed in /Library/CFMSupport. The ConfigurePython
|
2001-12-27 19:01:18 -04:00
|
|
|
applets will complain if you have no right to create the libraries there
|
|
|
|
(you need Admin privileges). This has one consequence: you will not be able to
|
|
|
|
run applets unless they reside in the MacPython folder (such as the IDE or
|
|
|
|
EditPythonPrefs). If you try to run an applet stored elsewhere you will
|
|
|
|
get a "Cannot locate PythonCore" error message.
|
2001-04-25 19:11:24 -03:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
Things to see
|
|
|
|
-------------
|
|
|
|
|
2000-05-06 20:01:07 -03:00
|
|
|
Start off at Mac:Demo:index.html. Read at least the first few sections.
|
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
There is also a first stab at documentation (plus examples) in the
|
|
|
|
Mac:Demo folder. The toplevel Demo folder has machine-independent demos.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
The ":Mac:scripts" folder has some sample scripts. Some are useful,
|
|
|
|
some are just interesting to look at to see how various things
|
|
|
|
work. The MkDistr, mkapplet and fullbuild scripts (plus the ones
|
|
|
|
mentioned above) may help you to understand how to use AppleEvents and
|
|
|
|
various other toolboxes from python.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
Other mac-specific goodies can be found in :Mac:Tools, of which the
|
|
|
|
IDE sources and a CGI framework deserve special mention.
|
2000-09-10 09:02:28 -03:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
The 'img' group of modules, which handles I/O of many different image
|
1998-04-27 12:14:36 -03:00
|
|
|
formats is included, but without documentation. You can find docs at
|
|
|
|
ftp://ftp.cwi.nl/pub/jack/python/img (or somewhere around there).
|
|
|
|
|
|
|
|
Finally there is a Mac:Contrib folder which contains some contributed
|
2000-05-06 20:01:07 -03:00
|
|
|
software.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
|
|
|
Upgrading from older Python releases
|
|
|
|
------------------------------------
|
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
Python releases are independent of each other, with separate
|
|
|
|
Preferences files, shared library names, etc. The good news is that
|
|
|
|
this means you can keep your older version around if you are unsure
|
1997-08-26 10:25:06 -03:00
|
|
|
whether to upgrade. The bad news is that your old preference settings
|
|
|
|
are lost and you have to set them again.
|
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
After you are satisfied that 2.3a1 works as expected you can trash
|
1997-08-26 10:25:06 -03:00
|
|
|
anything in the system folder that has "python" in the name and not
|
2003-01-08 12:27:44 -04:00
|
|
|
"2.3a1".
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2003-01-08 12:27:44 -04:00
|
|
|
The ConfigurePython applet will try to detect incompatible
|
2001-10-31 06:13:52 -04:00
|
|
|
preferences files and offer to remove them. This means that re-running
|
|
|
|
ConfigurePython after a second install of the same MacPython version
|
|
|
|
(or after moving the Python folder) should fix things up correctly.
|
2001-03-27 17:38:55 -04:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
The installer
|
|
|
|
-------------
|
|
|
|
|
2000-05-06 20:01:07 -03:00
|
|
|
The installer for this product was created using Installer VISE
|
|
|
|
from MindVision Software. For more information on Installer VISE,
|
1997-08-26 10:25:06 -03:00
|
|
|
contact:
|
|
|
|
MindVision Software
|
|
|
|
7201 North 7th Street
|
|
|
|
Lincoln, NE 68521-8913
|
|
|
|
Voice: 402-477-3269
|
|
|
|
Fax: 402-477-1395
|
|
|
|
Internet: mindvision@mindvision.com
|
|
|
|
http://www.mindvision.com
|
|
|
|
|
2001-12-13 08:58:09 -04:00
|
|
|
Just van Rossum <just@letterror.com> created the initial version of the
|
2000-05-06 20:01:07 -03:00
|
|
|
installer (with Installer Vise Lite), and Jack worked from there.
|
1997-08-26 10:25:06 -03:00
|
|
|
|
2000-04-22 19:57:25 -03:00
|
|
|
Thanks!
|
|
|
|
-------
|
|
|
|
|
2002-08-19 10:17:39 -03:00
|
|
|
As of Python 2.3 the MacPython thanks list has been merged into the
|
|
|
|
general acknowledgements, see :Misc:ACKS.
|
2000-04-22 19:57:25 -03:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
MacPython includes waste, a TextEdit replacement which is (c) 1998
|
|
|
|
Marco Piovanelli.
|
2000-10-12 18:21:43 -03:00
|
|
|
|
2001-10-31 06:13:52 -04:00
|
|
|
A special mention is deserved by Matthias Neeracher, who has written
|
|
|
|
the brilliant unix-compatible GUSI I/O library, without which
|
|
|
|
MacPython would not have sockets or select, and to Alexandre
|
|
|
|
Parenteau, who has ported this library to Carbon.
|
2001-01-23 17:03:52 -04:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
Feedback
|
|
|
|
--------
|
|
|
|
|
|
|
|
Send bug reports, suggestions, contributions and fanmail to
|
1998-01-06 08:13:16 -04:00
|
|
|
<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
|
1997-08-26 10:25:06 -03:00
|
|
|
<pythonmac-sig@python.org> mailing list, which is explicitly meant for
|
|
|
|
this purpose.
|
|
|
|
|
2001-03-05 11:44:55 -04:00
|
|
|
|
1997-08-26 10:25:06 -03:00
|
|
|
Jack Jansen
|
2001-12-27 19:01:18 -04:00
|
|
|
CWI
|
|
|
|
Kruislaan 413
|
|
|
|
1098 SJ Amsterdam
|
1997-08-26 10:25:06 -03:00
|
|
|
the Netherlands
|
|
|
|
|
|
|
|
<jack@cwi.nl>, http://www.cwi.nl/~jack
|