Kaydet (Commit) 8a6cdccf authored tarafından Jack Jansen's avatar Jack Jansen

Updated for 2.0b1

üst e61aca7d
This diff is collapsed.
......@@ -6,9 +6,9 @@
<H1>Embedding Python on the Mac</H1>
<HR>
<B>Note</B>: if you have a binary-only release of MacPython you will not
have this demo installed. Go to
have this demo installed. Install the developer option (in the standard installer) or go to
<a href="http://www.cwi.nl/~jack/macpython.html">Jack's MacPython Page</a>
to download either a source or a development release if you want to embed
to download either a source release if you want to embed
Python in other applications. <p>
Embedding Python on the mac is pretty similar to embedding it on other
......
......@@ -23,8 +23,7 @@ The easiest way to create an application from a Python script is simply by dropp
it on the <code>BuildApplication</code> applet in the main Python folder.
BuildApplication has a similar interface as BuildApplet: you drop a script on
it and it will process it, along with an optional <code>.rsrc</code> file.
It does ask one extra question: whether you want to build your application for
PPC macs only, 68K macs or any Mac.<P>
<P>
What BuildApplication does, however, is very different. It parses your script,
recursively looking for all modules you use, bundles the compiled code for
......
<HTML>
<HEAD>
<TITLE>Using Python 1.5 on the Macintosh</TITLE>
<TITLE>Using Python 2.0 on the Macintosh</TITLE>
</HEAD>
<BODY>
<H1>Using Python 1.5 on the Macintosh</H1>
<H1>Using Python 2.0 on the Macintosh</H1>
<HR>
This document is an introduction to using Python on the Apple
......@@ -15,26 +15,32 @@ tutorial, and provides some additional material. <p>
The tutorial, along with other indispensible documentation like the
library reference and such, is also available in a number of different
formats at <a href="ftp://ftp.python.org/pub/python/doc">
ftp://ftp.python.org/pub/python/doc</a>. The Adobe Acrobat <code>.pdf</code>
formats at <a href="http://www.python.org">
www.python.org</a>. The Adobe Acrobat <code>.pdf</code>
files are probably a good choice for reading or printing the documents
from your mac. <p>
There is currently no good tutorial for the mac-specific features of
Python, but to whet your appetite: it has interfaces to many MacOS
toolboxes (quickdraw, sound, quicktime, open scripting, etc) and
various portable toolboxes are available too (Tk, stdwin, complex
various portable toolboxes are available too (Tk, complex
numbers, image manipulation, etc). Some <A HREF="index.html">
annotated sample programs</A> are available to give you an idea of
Python's power. <P>
<h2>Invoking the interpreter</h2>
<h2>Using Python</h2>
The name of the interpreter may differ on different installations: it
may be called <CODE>PythonFAT</CODE> (for powerpc macs and 68K macs with
CFM68K installed) or <CODE>Python68K</CODE> (for 68K macs).
It will always
be recognizable by the "16 ton" icon, though. You start the
The best way to start using Python is by using the <code>Python IDE</code>,
an integrated development environment with editor, debugger, class browser, etc.
Unfortunately the IDE is not yet documented here. Fortunately, however, it does not
need much documentation, so your best bet is to try it. <p>
<h2>Invoking the bare interpreter</h2>
An alternative method to use Python (and the method this document unfortunately emphasizes,
see the comment above) is to use the bare interpreter and an external text editor.
The name of the interpreter is <CODE>PythonInterpreter</CODE> and it is
recognizable by the "16 ton" icon. You start the
interpreter in interactive mode by double-clicking its icon: <p>
<img src="html.icons/python.gif"><p>
......@@ -417,7 +423,7 @@ The next section to check out is the <a href="index.html">annotated sample progr
<HR>
<A HREF="http://www.cwi.nl/~jack">Jack Jansen</A>,
<A HREF="mailto:jack@cwi.nl">jack@cwi.nl</A>, 27-Apr-98.
<A HREF="mailto:jack@cwi.nl">jack@cwi.nl</A>, 10-Sep-00.
</BODY>
</HTML>
How to install Python 1.6a2 on your Macintosh
How to install Python 2.0b1 on your Macintosh
---------------------------------------------
If this is your first encounter with Python: you definitely need the
......@@ -13,39 +13,29 @@ now. The documentation is in HTML format, start with index.html.
Caveats
-------
This is an alfa version, and for this once it really means that: there
are quite a few features that have only lightly been tested, and bugs are
to be expected.
Aside from the general Python 1.6 features like unicode support the
main new features of this MacPython release is support for multithreading.
This has had some preliminary testing, but please report any success or failure
on the mailing list.
This installer installs MacPython for PowerPC only, whether a 68K distribution
of Python 1.6 will happen is not certain at the moment.
Changes since 1.6a1
-------------------
- All core-Python changes, plus a few from after 1.6a2, approximately as the
Python CVS tree was at May 5.
- The threading performance bug has been fixed.
- Tkinter is included again (yeah!), but only lightly tested. Please report
findings to the mailing list.
- macfsn.py is auto-imported on startup (unless disabled with a new option).
This retrofits macfs.StandardGetFile() and friends to use Navigation Services
in stead of the old Standard File dialogs.
- I think all installer problems have been fixed. Please report if not so.
This is a beta version, so use with caution.
Aside from the general new Python 2.0 features (compared to 1.5.2, there
was no 1.6 for the macintosh) like unicode support the main new features
of this MacPython release is support for multithreading. This has had
some preliminary testing, but please report any success or failure on
the mailing list.
This installer installs MacPython for PowerPC only, if you really want
68k support you will have to stay with 1.5.2. Or, if you are willing to
invest the time and have access to CodeWarrior you are welcome to try
and build a 68k distribution, most of the projects and sources are
reasonably up to date (May 2000). Contact me for details.
What to install
---------------
This installer is PPC only: too many new MacOS features are not available on 68K,
and doing workarounds, even just #ifdeffing in the code, is too much work for
me right now. If someone wants to revive 68K-MacPython: please do so. The project
files still contain the 68K targets (they're simply skipped by the build process)
so all that is needed is CodeWarrior, a source distribution and commitment.
This installer is PPC only: too many new MacOS features are not
available on 68K, and doing workarounds, even just #ifdeffing in the
code, is too much work for me right now. If someone wants to revive
68K-MacPython: please do so. The project files still contain the 68K
targets (they're simply skipped by the build process) so all that is
needed is CodeWarrior, a source distribution and commitment.
The optional parts in this distribution are
- TK+PIL: Tkinter and support modules, plus Imaging, the Python image manipulation
......@@ -54,13 +44,16 @@ The optional parts in this distribution are
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.
on matrices and such. This is the most recent version from the sourceforge archive.
- 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
ConfigurePython applet, to finish configuration of your Python.
If you have previously installed another copy of 2.0b1 you should manually
remove your preference file first (but no such action is needed for installing
beside older MacPythons, and they will live together happily).
If you don't have enough memory: the sizes choosen are somewhat
arbitrary. Try lowering the application sizes in the finder "get info"
......@@ -71,14 +64,10 @@ necessary to increase the application size.
After installing
----------------
The first step thing you could try is to run "compileall.py" to create
all .pyc files, but this isn't very important, as pyc files are
created on-the-fly as well. You may also want to skip this step if you
are low on diskspace.
Next, it is probably a good idea to run the automatic tests. Start
Python and "import test.autotest". This should not print only one error, about some
AM/PM format not supported in strftime.
It is probably a good idea to run the automatic tests. Start
Python and "import test.autotest". This should print only 2 or 3 errors, about some
AM/PM format not supported in strftime, about a MemoryError in test_longexp and
about a memory error in test_zlib.
It will, however, print some messages about optional features
not supported. Also, if you didn't run compileall before autotesting
you may run out of memory the first time you run the
......@@ -91,32 +80,39 @@ 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
library "PythonCore 1.6a2" lives in the Extensions folder and the
"Python 1.6a2 Preferences" file in the Preferences folder. All the rest
of Python lives in the folder you installed in.
library "PythonCore 2.0b1" lives in the Extensions folder and the
"Python 2.0b1 Preferences" file in the Python subfolder in the
Preferences folder. All the rest of Python lives in the folder you
installed in.
Things to see
-------------
Start off at Mac:Demo:index.html. Read at least the first few sections.
There are also some readme files in the "Read me files" folder that may
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 "scripts" folder has some sample scripts. Some are useful, some are
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).
......@@ -133,7 +129,7 @@ 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 1.6a2 works as expected you can trash
After you are satisfied that 2.0b1 works as expected you can trash
anything in the system folder that has "python" in the name and not
"1.6a2".
......@@ -159,8 +155,8 @@ 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,
Erik van Blokland, Bill Bedford, Chris Stern, Gordon Worley, Oliver Steele, M. Papillon
and all the other people who provided feedback, code or both!
Erik van Blokland, Bill Bedford, Chris Stern, Gordon Worley, Oliver Steele, M. Papillon,
Steven Majewski and all the other people who provided feedback, code or both!
Feedback
--------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment