cpython/Mac
Jack Jansen 3070ee6b37 Experimental feature: allow \n as well as \r as newline for text files, by breaking in to the lowlevel I/O system. Can be disabled by defining WITHOUT_UNIX_NEWLINES. 2001-08-27 23:16:34 +00:00
..
Build Updated to the current state of affairs. 2001-08-27 13:58:21 +00:00
Compat
Contrib Import the MacOS toolbox modules from the Carbon package. 2001-08-25 12:15:04 +00:00
Demo Use the new macresource module to open the accompanying resource file (if needed). 2001-08-27 21:41:23 +00:00
Distributions Merged release21-maint changes. 2001-08-12 00:11:15 +00:00
IDE scripts Import the MacOS toolbox modules from the Carbon package. 2001-08-25 12:15:04 +00:00
Include The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package. 2001-08-23 13:51:46 +00:00
Lib need() now returns the refno of the resource file opened, or None if the 2001-08-27 21:37:45 +00:00
MPW
Modules exceptions was missing from the module list. Added. 2001-08-27 22:50:41 +00:00
OSX Steven Majewski's instructions for building the toolbox modules for 2001-02-16 21:48:24 +00:00
OSXResources/framework Resource files for OSX Python.framework. Incomplete, and they should probably 2001-08-08 22:00:26 +00:00
Python Experimental feature: allow \n as well as \r as newline for text files, by breaking in to the lowlevel I/O system. Can be disabled by defining WITHOUT_UNIX_NEWLINES. 2001-08-27 23:16:34 +00:00
Resources Step 1 in packaging the toolbox modules and making MacPython more 2001-08-19 22:02:56 +00:00
Tools Use the new macresource module to open the accompanying resource file (if needed). 2001-08-27 21:41:23 +00:00
Unsupported These have long outlived there usefulness, in my opinion. Moved to Unsupported. 2001-08-27 21:17:44 +00:00
Wastemods Waste 1.3 extra's modified for waste 2.0 (and missing from MW's distribution of 2.0). 2001-02-15 22:56:41 +00:00
mwerks This file has been dead for aeons. I have no idea how it suddenly 2001-08-21 10:49:11 +00:00
scripts Use the new macresource module to open the accompanying resource file (if needed). 2001-08-27 21:41:23 +00:00
tclmods Got rid of the whole event filtering mess again, I can't get it to work. Simply disabling the Tk event handling hook in _tkinter is not as nice, but at least it works. 2001-04-27 20:43:27 +00:00
HISTORY
ReadMe Added Dean Draayer to the thank you list. 2001-08-27 15:30:48 +00:00
ReadMe-dev
ReadMe-src
Relnotes Merging appropriate 2.1.1 fixes back into the main trunk. 2001-08-03 13:31:36 +00:00
_checkversion.py Merging appropriate 2.1.1 fixes back into the main trunk. 2001-08-03 13:31:36 +00:00

ReadMe

How to install Python 2.1.1 on your Macintosh
---------------------------------------------

This is a MacPython that can run on classic MacOS (from 8.1
onwards) and natively on MacOSX. The installer tries to work out whether you can
use the Carbon version or not.

You should definitely read the Relnotes file too.

A special note about the active installer: do not background it, it may hang
your machine. This is a general problem with Vise active installers, MindVision
are working on it.

------

If this is your first encounter with Python: you definitely need the
common user documentation (common to all platforms). You can find this
(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.

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.

Caveats
-------
Aside from the general new Python 2.1.1 features compared to 2.0 the main
feature of this release is Carbon support.

This installer installs MacPython for classic PPC MacOS, MacPython for Carbon
(OS X, OS 9 or OS8 with CarbonLib installed) or both, depending on your
configuration. By selecting custom install you can bypass these tests and
install what you want.

If you want 68k support you will have to stay with MacPython 1.5.2.

What to install
---------------

The optional parts in this distribution are
- TK+PIL: Tkinter and support modules, plus Imaging, the Python image manipulation 
  package (allows you to read, write and display images and do lots of operations on them).
  For Carbon MacPython you only get PIL: there is no Tcl/Tk for Carbon yet.
  This is the reason Classic MacPython is also installed on MacOSX: it allows you
  to run Tkinter applications, albeit in the MacOS9 box.
- 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
  on matrices and such. This is the most recent version from the sourceforge archive.
  Numeric has moved from Extensions to :Lib:site-python, by the way, see the release
  notes.
- Developers kit: all header files and some tools and sample projects to get you started on
  writing Python extensions if you have CodeWarrior.
All these except the DevKit are installed with Easy Install.

After the installer finishes it automatically launches the appropriate
ConfigurePython applet, to finish configuration of your Python. If you run MacOS9 or later
(or 8 with CarbonLib installed) you can switch back and forth between the classic and
Carbon versions of Python by running either ConfigurePythonClassic or ConfigurePythonCarbon.

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).

If you don't have enough memory: the sizes choosen are somewhat
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.

After installing
----------------

It is probably a good idea to run the automatic tests. Start
Python and "import test.autotest". 

Three tests will fail on MacOS9, all with MemoryErrors:
test_longexp, test_sha and test_zlib (on MacOSX nothing should fail).

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.

Uninstalling
------------

Two items are installed in the system folder: the interpreter shared
libraries PythonCore and PythonCoreCarbon lives in the Extensions folder and the
"Python 2.1.1 Preferences" file in the Python subfolder in the
Preferences folder. All the rest of Python lives in the folder you
installed in.

On OSX the libraries are installed in /Library/CFMSupport. There is a nasty bug
in OSX that is triggered by Python: if any orphaned aliases are left in
/Library/CFMSupport your machine will start to behave very badly. 2.1
beta installers triggered this problem if you simply threw away your Python folder,
so if you installed a 2.1beta you should clean out the aliases in /Library/CFMSupport
too. The final 2.1 installer always copied the shared libraries on OSX, so it does
not have the problem anymore.

Things to see
-------------

Start off at Mac:Demo:index.html. Read at least the first few sections.

There are also some interesting files in the "Relnotes" folder that may
contain useful information. There is also a first stab at documentation
(plus examples) in the Mac:Demo folder. The toplevel Demo folder has
machine-independent demos. 
The Mac:Lib:test folder also has some programs that show simple
capabilities of various modules.

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.

Other mac-specific goodies can be found in :Mac:Tools, of which the IDE sources
and a CGI framework deserve special mention.

The 'img' group of modules, which handles I/O of many different image
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
software.

Upgrading from older Python releases
------------------------------------

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
whether to upgrade. The bad news is that your old preference settings
are lost and you have to set them again.

After you are satisfied that 2.1.1 works as expected you can trash
anything in the system folder that has "python" in the name and not
"2.1.1".

As of 2.1 the ConfigurePython applets will try to detect incompatible 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.

The installer
-------------

The installer for this product was created using Installer VISE
from MindVision Software. For more information on Installer VISE,
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

Just van Rossum <just@letterror.nl> created the initial version of the
installer (with Installer Vise Lite), and Jack worked from there.

Thanks!
-------

Thanks go to the whole Python community with Guido in the lead, of
course. Mac-specific thanks go to the pythonmac-sig, Just van Rossum,
Corran Webster, Tony Ingraldi, Erik van Blokland, Bill Bedford, Chris
Stern, Gordon Worley, Oliver Steele, M. Papillon, Steven Majewski, David
Goodger, Chris Barker, Luc Lefebvre, Tattoo Mabonzo K., Russell Finn,
Tom Bridgman, Russel Owen, Pascal Oberndoerfer, Dean Draayer
and all the other people who provided feedback, code or both!

MacPython includes waste, a TextEdit replacement which is (c) 1998 Marco Piovanelli.

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.

Feedback
--------

Send bug reports, suggestions, contributions and fanmail to
<jack@cwi.nl>. However, a better way to discuss MacPython is to join the
<pythonmac-sig@python.org> mailing list, which is explicitly meant for
this purpose.


Jack Jansen
Oratrix Development BV
Valeriusplein 30
Amsterdam
the Netherlands

<jack@cwi.nl>, http://www.cwi.nl/~jack