diff options
author | Thomas Wouters <thomas@python.org> | 2006-06-08 15:35:45 (GMT) |
---|---|---|
committer | Thomas Wouters <thomas@python.org> | 2006-06-08 15:35:45 (GMT) |
commit | 73e5a5b65d66f4fba9c4f626bcd6400f4a7215e6 (patch) | |
tree | 206b2ca44cf23af41ac27cb7b3744f2e60a3341d /Mac/Resources/app | |
parent | 1ba5b3b425e970ec3e4a19165475aa68fa5ac893 (diff) | |
download | cpython-73e5a5b65d66f4fba9c4f626bcd6400f4a7215e6.zip cpython-73e5a5b65d66f4fba9c4f626bcd6400f4a7215e6.tar.gz cpython-73e5a5b65d66f4fba9c4f626bcd6400f4a7215e6.tar.bz2 |
Merge the rest of the trunk.
Merged revisions 46490-46494,46496,46498,46500,46506,46521,46538,46558,46563-46567,46570-46571,46583,46593,46595-46598,46604,46606,46609-46753 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r46610 | martin.v.loewis | 2006-06-03 09:42:26 +0200 (Sat, 03 Jun 2006) | 2 lines
Updated version (win32-icons2.zip) from #1490384.
........
r46612 | andrew.kuchling | 2006-06-03 20:09:41 +0200 (Sat, 03 Jun 2006) | 1 line
[Bug #1472084] Fix description of do_tag
........
r46614 | andrew.kuchling | 2006-06-03 20:33:35 +0200 (Sat, 03 Jun 2006) | 1 line
[Bug #1475554] Strengthen text to say 'must' instead of 'should'
........
r46616 | andrew.kuchling | 2006-06-03 20:41:28 +0200 (Sat, 03 Jun 2006) | 1 line
[Bug #1441864] Clarify description of 'data' argument
........
r46617 | andrew.kuchling | 2006-06-03 20:43:24 +0200 (Sat, 03 Jun 2006) | 1 line
Minor rewording
........
r46619 | andrew.kuchling | 2006-06-03 21:02:35 +0200 (Sat, 03 Jun 2006) | 9 lines
[Bug #1497414] _self is a reserved word in the WATCOM 10.6 C compiler.
Fix by renaming the variable.
In a different module, Neal fixed it by renaming _self to self. There's
already a variable named 'self' here, so I used selfptr.
(I'm committing this on a Mac without Tk, but it's a simple search-and-replace.
<crosses fingers>, so I'll watch the buildbots and see what happens.)
........
r46621 | fredrik.lundh | 2006-06-03 23:56:05 +0200 (Sat, 03 Jun 2006) | 5 lines
"_self" is a said to be a reserved word in Watcom C 10.6. I'm
not sure that's really standard compliant behaviour, but I guess
we have to fix that anyway...
........
r46622 | andrew.kuchling | 2006-06-04 00:44:42 +0200 (Sun, 04 Jun 2006) | 1 line
Update readme
........
r46623 | andrew.kuchling | 2006-06-04 00:59:23 +0200 (Sun, 04 Jun 2006) | 1 line
Drop 0 parameter
........
r46624 | andrew.kuchling | 2006-06-04 00:59:59 +0200 (Sun, 04 Jun 2006) | 1 line
Some code tidying; use curses.wrapper
........
r46625 | andrew.kuchling | 2006-06-04 01:02:15 +0200 (Sun, 04 Jun 2006) | 1 line
Use True; value returned from main is unused
........
r46626 | andrew.kuchling | 2006-06-04 01:07:21 +0200 (Sun, 04 Jun 2006) | 1 line
Use true division, and the True value
........
r46627 | andrew.kuchling | 2006-06-04 01:09:58 +0200 (Sun, 04 Jun 2006) | 1 line
Docstring fix; use True
........
r46628 | andrew.kuchling | 2006-06-04 01:15:56 +0200 (Sun, 04 Jun 2006) | 1 line
Put code in a main() function; loosen up the spacing to match current code style
........
r46629 | andrew.kuchling | 2006-06-04 01:39:07 +0200 (Sun, 04 Jun 2006) | 1 line
Use functions; modernize code
........
r46630 | andrew.kuchling | 2006-06-04 01:43:22 +0200 (Sun, 04 Jun 2006) | 1 line
This demo requires Medusa (not just asyncore); remove it
........
r46631 | andrew.kuchling | 2006-06-04 01:46:36 +0200 (Sun, 04 Jun 2006) | 2 lines
Remove xmlrpc demo -- it duplicates the SimpleXMLRPCServer module.
........
r46632 | andrew.kuchling | 2006-06-04 01:47:22 +0200 (Sun, 04 Jun 2006) | 1 line
Remove xmlrpc/ directory
........
r46633 | andrew.kuchling | 2006-06-04 01:51:21 +0200 (Sun, 04 Jun 2006) | 1 line
Remove dangling reference
........
r46634 | andrew.kuchling | 2006-06-04 01:59:36 +0200 (Sun, 04 Jun 2006) | 1 line
Add more whitespace; use a better socket name
........
r46635 | tim.peters | 2006-06-04 03:22:53 +0200 (Sun, 04 Jun 2006) | 2 lines
Whitespace normalization.
........
r46637 | tim.peters | 2006-06-04 05:26:02 +0200 (Sun, 04 Jun 2006) | 16 lines
In a PYMALLOC_DEBUG build obmalloc adds extra debugging info
to each allocated block. This was using 4 bytes for each such
piece of info regardless of platform. This didn't really matter
before (proof: no bug reports, and the debug-build obmalloc would
have assert-failed if it was ever asked for a chunk of memory
>= 2**32 bytes), since container indices were plain ints. But after
the Py_ssize_t changes, it's at least theoretically possible to
allocate a list or string whose guts exceed 2**32 bytes, and the
PYMALLOC_DEBUG routines would fail then (having only 4 bytes
to record the originally requested size).
Now we use sizeof(size_t) bytes for each of a PYMALLOC_DEBUG
build's extra debugging fields. This won't make any difference
on 32-bit boxes, but will add 16 bytes to each allocation in
a debug build on a 64-bit box.
........
r46638 | tim.peters | 2006-06-04 05:38:04 +0200 (Sun, 04 Jun 2006) | 4 lines
_PyObject_DebugMalloc(): The return value should add
2*sizeof(size_t) now, not 8. This probably accounts for
current disasters on the 64-bit buildbot slaves.
........
r46639 | neal.norwitz | 2006-06-04 08:19:31 +0200 (Sun, 04 Jun 2006) | 1 line
SF #1499797, Fix for memory leak in WindowsError_str
........
r46640 | andrew.macintyre | 2006-06-04 14:31:09 +0200 (Sun, 04 Jun 2006) | 2 lines
Patch #1454481: Make thread stack size runtime tunable.
........
r46641 | andrew.macintyre | 2006-06-04 14:59:59 +0200 (Sun, 04 Jun 2006) | 2 lines
clean up function declarations to conform to PEP-7 style.
........
r46642 | martin.blais | 2006-06-04 15:49:49 +0200 (Sun, 04 Jun 2006) | 15 lines
Fixes in struct and socket from merge reviews.
- Following Guido's comments, renamed
* pack_to -> pack_into
* recv_buf -> recv_into
* recvfrom_buf -> recvfrom_into
- Made fixes to _struct.c according to Neal Norwitz comments on the checkins
list.
- Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
........
r46643 | ronald.oussoren | 2006-06-04 16:05:28 +0200 (Sun, 04 Jun 2006) | 3 lines
"Import" LDFLAGS in Mac/OSX/Makefile.in to ensure pythonw gets build with
the right compiler flags.
........
r46644 | ronald.oussoren | 2006-06-04 16:24:59 +0200 (Sun, 04 Jun 2006) | 2 lines
Drop Mac wrappers for the WASTE library.
........
r46645 | tim.peters | 2006-06-04 17:49:07 +0200 (Sun, 04 Jun 2006) | 3 lines
s_methods[]: Stop compiler warnings by casting
s_unpack_from to PyCFunction.
........
r46646 | george.yoshida | 2006-06-04 19:04:12 +0200 (Sun, 04 Jun 2006) | 2 lines
Remove a redundant word
........
r46647 | george.yoshida | 2006-06-04 19:17:25 +0200 (Sun, 04 Jun 2006) | 2 lines
Markup fix
........
r46648 | martin.v.loewis | 2006-06-04 21:36:28 +0200 (Sun, 04 Jun 2006) | 2 lines
Patch #1359618: Speed-up charmap encoder.
........
r46649 | georg.brandl | 2006-06-04 23:46:16 +0200 (Sun, 04 Jun 2006) | 3 lines
Repair refleaks in unicodeobject.
........
r46650 | georg.brandl | 2006-06-04 23:56:52 +0200 (Sun, 04 Jun 2006) | 4 lines
Patch #1346214: correctly optimize away "if 0"-style stmts
(thanks to Neal for review)
........
r46651 | georg.brandl | 2006-06-05 00:15:37 +0200 (Mon, 05 Jun 2006) | 2 lines
Bug #1500293: fix memory leaks in _subprocess module.
........
r46654 | tim.peters | 2006-06-05 01:43:53 +0200 (Mon, 05 Jun 2006) | 2 lines
Whitespace normalization.
........
r46655 | tim.peters | 2006-06-05 01:52:47 +0200 (Mon, 05 Jun 2006) | 16 lines
Revert revisions:
46640 Patch #1454481: Make thread stack size runtime tunable.
46647 Markup fix
The first is causing many buildbots to fail test runs, and there
are multiple causes with seemingly no immediate prospects for
repairing them. See python-dev discussion.
Note that a branch can (and should) be created for resolving these
problems, like
svn copy svn+ssh://svn.python.org/python/trunk -r46640 svn+ssh://svn.python.org/python/branches/NEW_BRANCH
followed by merging rev 46647 to the new branch.
........
r46656 | andrew.kuchling | 2006-06-05 02:08:09 +0200 (Mon, 05 Jun 2006) | 1 line
Mention second encoding speedup
........
r46657 | gregory.p.smith | 2006-06-05 02:31:01 +0200 (Mon, 05 Jun 2006) | 7 lines
bugfix: when log_archive was called with the DB_ARCH_REMOVE flag present
in BerkeleyDB >= 4.2 it tried to construct a list out of an uninitialized
char **log_list.
feature: export the DB_ARCH_REMOVE flag by name in the module on BerkeleyDB >= 4.2.
........
r46658 | gregory.p.smith | 2006-06-05 02:33:35 +0200 (Mon, 05 Jun 2006) | 5 lines
fix a bug in the previous commit. don't leak empty list on error return and
fix the additional rare (out of memory only) bug that it was supposed to fix
of not freeing log_list when the python allocator failed.
........
r46660 | tim.peters | 2006-06-05 02:55:26 +0200 (Mon, 05 Jun 2006) | 9 lines
"Flat is better than nested."
Move the long-winded, multiply-nested -R support out
of runtest() and into some module-level helper functions.
This makes runtest() and the -R code easier to follow.
That in turn allowed seeing some opportunities for code
simplification, and made it obvious that reglog.txt
never got closed.
........
r46661 | hyeshik.chang | 2006-06-05 02:59:54 +0200 (Mon, 05 Jun 2006) | 3 lines
Fix a potentially invalid memory access of CJKCodecs' shift-jis
decoder. (found by Neal Norwitz)
........
r46663 | gregory.p.smith | 2006-06-05 03:39:52 +0200 (Mon, 05 Jun 2006) | 3 lines
* support DBEnv.log_stat() method on BerkeleyDB >= 4.0 [patch #1494885]
........
r46664 | tim.peters | 2006-06-05 03:43:03 +0200 (Mon, 05 Jun 2006) | 3 lines
Remove doctest.testmod's deprecated (in 2.4) `isprivate`
argument. A lot of hair went into supporting that!
........
r46665 | tim.peters | 2006-06-05 03:47:24 +0200 (Mon, 05 Jun 2006) | 2 lines
Whitespace normalization.
........
r46666 | tim.peters | 2006-06-05 03:48:21 +0200 (Mon, 05 Jun 2006) | 2 lines
Make doctest news more accurate.
........
r46667 | gregory.p.smith | 2006-06-05 03:56:15 +0200 (Mon, 05 Jun 2006) | 3 lines
* support DBEnv.lsn_reset() method on BerkeleyDB >= 4.4 [patch #1494902]
........
r46668 | gregory.p.smith | 2006-06-05 04:02:25 +0200 (Mon, 05 Jun 2006) | 3 lines
mention the just committed bsddb changes
........
r46671 | gregory.p.smith | 2006-06-05 19:38:04 +0200 (Mon, 05 Jun 2006) | 3 lines
* add support for DBSequence objects [patch #1466734]
........
r46672 | gregory.p.smith | 2006-06-05 20:20:07 +0200 (Mon, 05 Jun 2006) | 3 lines
forgot to add this file in previous commit
........
r46673 | tim.peters | 2006-06-05 20:36:12 +0200 (Mon, 05 Jun 2006) | 2 lines
Whitespace normalization.
........
r46674 | tim.peters | 2006-06-05 20:36:54 +0200 (Mon, 05 Jun 2006) | 2 lines
Add missing svn:eol-style property to text files.
........
r46675 | gregory.p.smith | 2006-06-05 20:48:21 +0200 (Mon, 05 Jun 2006) | 4 lines
* fix DBCursor.pget() bug with keyword argument names when no data= is
supplied [SF pybsddb bug #1477863]
........
r46676 | andrew.kuchling | 2006-06-05 21:05:32 +0200 (Mon, 05 Jun 2006) | 1 line
Remove use of Trove name, which isn't very helpful to users
........
r46677 | andrew.kuchling | 2006-06-05 21:08:25 +0200 (Mon, 05 Jun 2006) | 1 line
[Bug #1470026] Include link to list of classifiers
........
r46679 | tim.peters | 2006-06-05 22:48:49 +0200 (Mon, 05 Jun 2006) | 10 lines
Access _struct attributes directly instead of mucking with getattr.
string_reverse(): Simplify.
assertRaises(): Raise TestFailed on failure.
test_unpack_from(), test_pack_into(), test_pack_into_fn(): never
use `assert` to test for an expected result (it doesn't test anything
when Python is run with -O).
........
r46680 | tim.peters | 2006-06-05 22:49:27 +0200 (Mon, 05 Jun 2006) | 2 lines
Add missing svn:eol-style property to text files.
........
r46681 | gregory.p.smith | 2006-06-06 01:38:06 +0200 (Tue, 06 Jun 2006) | 3 lines
add depends = ['md5.h'] to the _md5 module extension for correctness sake.
........
r46682 | brett.cannon | 2006-06-06 01:51:55 +0200 (Tue, 06 Jun 2006) | 4 lines
Add 3 more bytes to a buffer to cover constants in string and null byte on top of 10 possible digits for an int.
Closes bug #1501223.
........
r46684 | gregory.p.smith | 2006-06-06 01:59:37 +0200 (Tue, 06 Jun 2006) | 5 lines
- bsddb: the __len__ method of a DB object has been fixed to return correct
results. It could previously incorrectly return 0 in some cases.
Fixes SF bug 1493322 (pybsddb bug 1184012).
........
r46686 | tim.peters | 2006-06-06 02:25:07 +0200 (Tue, 06 Jun 2006) | 7 lines
_PySys_Init(): It's rarely a good idea to size a buffer to the
exact maximum size someone guesses is needed. In this case, if
we're really worried about extreme integers, then "cp%d" can
actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is
actually saved by making a stack-local buffer tiny.
........
r46687 | neal.norwitz | 2006-06-06 09:22:08 +0200 (Tue, 06 Jun 2006) | 1 line
Remove unused variable (and stop compiler warning)
........
r46688 | neal.norwitz | 2006-06-06 09:23:01 +0200 (Tue, 06 Jun 2006) | 1 line
Fix a bunch of parameter strings
........
r46689 | thomas.heller | 2006-06-06 13:34:33 +0200 (Tue, 06 Jun 2006) | 6 lines
Convert CFieldObject tp_members to tp_getset, since there is no
structmember typecode for Py_ssize_t fields. This should fix some of
the errors on the PPC64 debian machine (64-bit, big endian).
Assigning to readonly fields now raises AttributeError instead of
TypeError, so the testcase has to be changed as well.
........
r46690 | thomas.heller | 2006-06-06 13:54:32 +0200 (Tue, 06 Jun 2006) | 1 line
Damn - the sentinel was missing. And fix another silly mistake.
........
r46691 | martin.blais | 2006-06-06 14:46:55 +0200 (Tue, 06 Jun 2006) | 13 lines
Normalized a few cases of whitespace in function declarations.
Found them using::
find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done
find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done
(I was doing this all over my own code anyway, because I'd been using spaces in
all defs, so I thought I'd make a run on the Python code as well. If you need
to do such fixes in your own code, you can use xx-rename or parenregu.el within
emacs.)
........
r46693 | thomas.heller | 2006-06-06 17:34:18 +0200 (Tue, 06 Jun 2006) | 1 line
Specify argtypes for all test functions. Maybe that helps on strange ;-) architectures
........
r46694 | tim.peters | 2006-06-06 17:50:17 +0200 (Tue, 06 Jun 2006) | 5 lines
BSequence_set_range(): Rev 46688 ("Fix a bunch of
parameter strings") changed this function's signature
seemingly by mistake, which is causing buildbots to fail
test_bsddb3. Restored the pre-46688 signature.
........
r46695 | tim.peters | 2006-06-06 17:52:35 +0200 (Tue, 06 Jun 2006) | 4 lines
On python-dev Thomas Heller said these were committed
by mistake in rev 46693, so reverting this part of
rev 46693.
........
r46696 | andrew.kuchling | 2006-06-06 19:10:41 +0200 (Tue, 06 Jun 2006) | 1 line
Fix comment typo
........
r46697 | brett.cannon | 2006-06-06 20:08:16 +0200 (Tue, 06 Jun 2006) | 2 lines
Fix coding style guide bug.
........
r46698 | thomas.heller | 2006-06-06 20:50:46 +0200 (Tue, 06 Jun 2006) | 2 lines
Add a hack so that foreign functions returning float now do work on 64-bit
big endian platforms.
........
r46699 | thomas.heller | 2006-06-06 21:25:13 +0200 (Tue, 06 Jun 2006) | 3 lines
Use the same big-endian hack as in _ctypes/callproc.c for callback functions.
This fixes the callback function tests that return float.
........
r46700 | ronald.oussoren | 2006-06-06 21:50:24 +0200 (Tue, 06 Jun 2006) | 5 lines
* Ensure that "make altinstall" works when the tree was configured
with --enable-framework
* Also for --enable-framework: allow users to use --prefix to specify
the location of the compatibility symlinks (such as /usr/local/bin/python)
........
r46701 | ronald.oussoren | 2006-06-06 21:56:00 +0200 (Tue, 06 Jun 2006) | 3 lines
A quick hack to ensure the right key-bindings for IDLE on osx: install patched
configuration files during a framework install.
........
r46702 | tim.peters | 2006-06-07 03:04:59 +0200 (Wed, 07 Jun 2006) | 4 lines
dash_R_cleanup(): Clear filecmp._cache. This accounts for
different results across -R runs (at least on Windows) of
test_filecmp.
........
r46705 | tim.peters | 2006-06-07 08:57:51 +0200 (Wed, 07 Jun 2006) | 17 lines
SF patch 1501987: Remove randomness from test_exceptions,
from ?iga Seilnacht (sorry about the name, but Firefox
on my box can't display the first character of the name --
the SF "Unix name" is zseil).
This appears to cure the oddball intermittent leaks across
runs when running test_exceptions under -R. I'm not sure
why, but I'm too sleepy to care ;-)
The thrust of the SF patch was to remove randomness in the
pickle protocol used. I changed the patch to use
range(pickle.HIGHEST_PROTOCOL + 1), to try both pickle and
cPickle, and randomly mucked with other test lines to put
statements on their own lines.
Not a bugfix candidate (this is fiddling new-in-2.5 code).
........
r46706 | andrew.kuchling | 2006-06-07 15:55:33 +0200 (Wed, 07 Jun 2006) | 1 line
Add an SQLite introduction, taken from the 'What's New' text
........
r46708 | andrew.kuchling | 2006-06-07 19:02:52 +0200 (Wed, 07 Jun 2006) | 1 line
Mention other placeholders
........
r46709 | andrew.kuchling | 2006-06-07 19:03:46 +0200 (Wed, 07 Jun 2006) | 1 line
Add an item; also, escape %
........
r46710 | andrew.kuchling | 2006-06-07 19:04:01 +0200 (Wed, 07 Jun 2006) | 1 line
Mention other placeholders
........
r46716 | ronald.oussoren | 2006-06-07 20:57:44 +0200 (Wed, 07 Jun 2006) | 2 lines
Move Mac/OSX/Tools one level up
........
r46717 | ronald.oussoren | 2006-06-07 20:58:01 +0200 (Wed, 07 Jun 2006) | 2 lines
Move Mac/OSX/PythonLauncher one level up
........
r46718 | ronald.oussoren | 2006-06-07 20:58:42 +0200 (Wed, 07 Jun 2006) | 2 lines
mv Mac/OSX/BuildScript one level up
........
r46719 | ronald.oussoren | 2006-06-07 21:02:03 +0200 (Wed, 07 Jun 2006) | 2 lines
Move Mac/OSX/* one level up
........
r46720 | ronald.oussoren | 2006-06-07 21:06:01 +0200 (Wed, 07 Jun 2006) | 2 lines
And the last bit: move IDLE one level up and adjust makefiles
........
r46723 | ronald.oussoren | 2006-06-07 21:38:53 +0200 (Wed, 07 Jun 2006) | 4 lines
- Patch the correct version of python in the Info.plists at build time, instead
of relying on a maintainer to update them before releases.
- Remove the now empty Mac/OSX directory
........
r46727 | ronald.oussoren | 2006-06-07 22:18:44 +0200 (Wed, 07 Jun 2006) | 7 lines
* If BuildApplet.py is used as an applet it starts with a version of
sys.exutable that isn't usuable on an #!-line. That results in generated
applets that don't actually work. Work around this problem by resetting
sys.executable.
* argvemulator.py didn't work on intel macs. This patch fixes this
(bug #1491468)
........
r46728 | tim.peters | 2006-06-07 22:40:06 +0200 (Wed, 07 Jun 2006) | 2 lines
Whitespace normalization.
........
r46729 | tim.peters | 2006-06-07 22:40:54 +0200 (Wed, 07 Jun 2006) | 2 lines
Add missing svn:eol-style property to text files.
........
r46730 | thomas.heller | 2006-06-07 22:43:06 +0200 (Wed, 07 Jun 2006) | 7 lines
Fix for foreign functions returning small structures on 64-bit big
endian machines. Should fix the remaininf failure in the PPC64
Debian buildbot.
Thanks to Matthias Klose for providing access to a machine to debug
and test this.
........
r46731 | brett.cannon | 2006-06-07 23:48:17 +0200 (Wed, 07 Jun 2006) | 2 lines
Clarify documentation for bf_getcharbuffer.
........
r46735 | neal.norwitz | 2006-06-08 07:12:45 +0200 (Thu, 08 Jun 2006) | 1 line
Fix a refleak in recvfrom_into
........
r46736 | gregory.p.smith | 2006-06-08 07:17:08 +0200 (Thu, 08 Jun 2006) | 9 lines
- bsddb: the bsddb.dbtables Modify method now raises the proper error and
aborts the db transaction safely when a modifier callback fails.
Fixes SF python patch/bug #1408584.
Also cleans up the bsddb.dbtables docstrings since thats the only
documentation that exists for that unadvertised module. (people
really should really just use sqlite3)
........
r46737 | gregory.p.smith | 2006-06-08 07:38:11 +0200 (Thu, 08 Jun 2006) | 4 lines
* Turn the deadlock situation described in SF bug #775414 into a
DBDeadLockError exception.
* add the test case for my previous dbtables commit.
........
r46738 | gregory.p.smith | 2006-06-08 07:39:54 +0200 (Thu, 08 Jun 2006) | 2 lines
pasted set_lk_detect line in wrong spot in previous commit. fixed. passes tests this time.
........
r46739 | armin.rigo | 2006-06-08 12:56:24 +0200 (Thu, 08 Jun 2006) | 6 lines
(arre, arigo) SF bug #1350060
Give a consistent behavior for comparison and hashing of method objects
(both user- and built-in methods). Now compares the 'self' recursively.
The hash was already asking for the hash of 'self'.
........
r46740 | andrew.kuchling | 2006-06-08 13:56:44 +0200 (Thu, 08 Jun 2006) | 1 line
Typo fix
........
r46741 | georg.brandl | 2006-06-08 14:45:01 +0200 (Thu, 08 Jun 2006) | 2 lines
Bug #1502750: Fix getargs "i" format to use LONG_MIN and LONG_MAX for bounds checking.
........
r46743 | georg.brandl | 2006-06-08 14:54:13 +0200 (Thu, 08 Jun 2006) | 2 lines
Bug #1502728: Correctly link against librt library on HP-UX.
........
r46745 | georg.brandl | 2006-06-08 14:55:47 +0200 (Thu, 08 Jun 2006) | 3 lines
Add news for recent bugfix.
........
r46746 | georg.brandl | 2006-06-08 15:31:07 +0200 (Thu, 08 Jun 2006) | 4 lines
Argh. "integer" is a very confusing word ;)
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
........
r46748 | nick.coghlan | 2006-06-08 15:54:49 +0200 (Thu, 08 Jun 2006) | 1 line
Add functools.update_wrapper() and functools.wraps() as described in PEP 356
........
r46751 | georg.brandl | 2006-06-08 16:50:21 +0200 (Thu, 08 Jun 2006) | 4 lines
Bug #1502805: don't alias file.__exit__ to file.close since the
latter can return something that's true.
........
r46752 | georg.brandl | 2006-06-08 16:50:53 +0200 (Thu, 08 Jun 2006) | 3 lines
Convert test_file to unittest.
........
Diffstat (limited to 'Mac/Resources/app')
29 files changed, 759 insertions, 0 deletions
diff --git a/Mac/Resources/app/Info.plist b/Mac/Resources/app/Info.plist new file mode 100644 index 0000000..387bbed --- /dev/null +++ b/Mac/Resources/app/Info.plist @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDocumentTypes</key> + <array> + <dict> + <key>CFBundleTypeOSTypes</key> + <array> + <string>****</string> + <string>fold</string> + <string>disk</string> + </array> + <key>CFBundleTypeRole</key> + <string>Viewer</string> + </dict> + </array> + <key>CFBundleExecutable</key> + <string>Python</string> + <key>CFBundleGetInfoString</key> + <string>2.5alpha0, (c) 2004 Python Software Foundation.</string> + <key>CFBundleHelpBookFolder</key> + <array> + <string>Documentation</string> + <string>PythonDocumentation</string> + </array> + <key>CFBundleHelpBookName</key> + <string>MacPython Help</string> + <key>CFBundleHelpTOCFile</key> + <string>index.html</string> + <key>CFBundleIconFile</key> + <string>PythonInterpreter.icns</string> + <key>CFBundleIdentifier</key> + <string>org.python.python</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleLongVersionString</key> + <string>2.5alpha0, (c) 2004 Python Software Foundation.</string> + <key>CFBundleName</key> + <string>Python</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleShortVersionString</key> + <string>2.5alpha0</string> + <key>CFBundleSignature</key> + <string>PytX</string> + <key>CFBundleVersion</key> + <string>2.5alpha0</string> + <key>CSResourcesFileMapped</key> + <true/> + <key>LSRequiresCarbon</key> + <true/> + <key>NSAppleScriptEnabled</key> + <true/> + <key>NSHumanReadableCopyright</key> + <string>(c) 2004 Python Software Foundation.</string> +</dict> +</plist> diff --git a/Mac/Resources/app/PkgInfo b/Mac/Resources/app/PkgInfo new file mode 100644 index 0000000..67c491a --- /dev/null +++ b/Mac/Resources/app/PkgInfo @@ -0,0 +1 @@ +APPLPytX
\ No newline at end of file diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif Binary files differnew file mode 100644 index 0000000..2b93dc8 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/PackageManager.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/community.html b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html new file mode 100644 index 0000000..140a38b --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/community.html @@ -0,0 +1,69 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>What is MacPython?</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> + <table> + <tr> + <td> + <img src="python.gif" width="128" height="128" align="top" alt=""> + </td> + <td> + <h1>MacPython Community</h1> + </td> + </tr> + </table> + <hr> + +<h2>Web Sites</h2> + +<p>The MacPython homepage, <a href="http://www.cwi.nl/~jack/macpython.html"> +www.cwi.nl/~jack/macpython.html</a> +is where you can find installers, documents, links to useful packages and more. +And, of course, +<a href="http://www.python.org">www.python.org</a> has a much larger collection +of material on Python that is not Mac-specific.</p> + +<h2>News groups and Mailing lists</h2> + +<p>There are a lot of mailing lists on Python. Some of the more interesting +ones are:</p> +<ul> +<li><a href="mailto:python-help@python.org">python-help@python.org</a> where +you can send questions for individual support. Please check the websites mentioned +above first, though!</li> +<li>The <a href="news:comp.lang.python">comp.lang.python</a> newsgroup for general +discussion. Also available as a +<a href="http://www.python.org/mailman/listinfo/python-list">mailing list</a>.</li> +<li>The <a href="news:comp.lang.python.announce">comp.lang.python.announce</a> +newsgroup for announcements. Low-volume and moderated. Also available as a +<a href="http://www.python.org/mailman/listinfo/python-announce-list">mailing list</a>.</li> +<li>Last but not least, the <a href="http://www.python.org/sigs/pythonmac-sig/">pythonmac-sig</a> +mailing list is specifically for MacPython. Discussions on the implementation of new +features, but beginners questions are welcome too.</li> +</ul> + +<p>In addition there are Python <a href="http://www.python.org/sigs/">Special Interest Group</a> +mailing lists on a wide variety of topics such as image processing, numerical algorithms +and more.</p> + +<h2>More</h2> + +<p>An index of conferences, Wiki's, bookshops and more can be found at the +<a href="http://www.python.org/psa/">Community</a> section of the Python website.</p> + +<p>If you find a bug you are kindly requested to report it, preferrably through the +automatic bug tracker at <a href="http://www.python.org">www.python.org</a></p> + +<p>If you want to become an active developer you are very welcome! Join the +pythonmac-sig mailing list mentioned above, and read the +<a href="http://www.python.org/dev/">Developer</a> section on the Python website.</p> + +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html new file mode 100644 index 0000000..2ce7357 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/doc/index.html @@ -0,0 +1,21 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Python Language Documentation</title> + <meta name="generator" content="BBEdit 6.5.3"> +</head> +<body> +<h1>Python Language and runtime documentation</h1> + +<p>This volume of documentation is rather big (17 Megabytes) and contains +a tutorial, full description of the Python library (all the modules +and packages included), formal description of the language and more.</p> + +<p>You can <a href="http://www.python.org/doc">view it online</a>, where +you can also download PDFs for printing, or you can download and install it +through the <a href="../packman.html">Package Manager</a> for viewing and +searching via Apple Help Viewer.</p> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html new file mode 100644 index 0000000..a8877ba --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/finder.html @@ -0,0 +1,36 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Python and the Finder</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>Running Python scripts from the Finder</h1> + <table> + <tr> + <td> + <img src="python.gif" width="128" height="128" align="top" alt=""> + </td> + <td> + <p>The application PythonLauncher will start a Python interpreter + when you drop a Python source file onto it, any file with a <tt>.py</tt> + or <tt>.pyw</tt> extension. If you set PythonLauncher as the default + application to open a file +(<a href="help:search=Changing%20the%20application%20that%20opens%20a%20file bookID=Mac%20Help"> +tell me more</a>) this also works when you double click a Python script.</p> + + <p>PythonLauncher has preferences per filetype for selecting + the interpreter to use, and how to launch it: in a Terminal window + or not, etc. Holding the Option key while launching your script will + bring up a window that allows changing these settings for a single + run. </p> + </td> + </tr> + </table> + <hr> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html new file mode 100644 index 0000000..252c78c --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/gui.html @@ -0,0 +1,54 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Creating a User Interface with MacPython</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>Creating a User Interface with MacPython</h1> + +<p>There are a number of packages that allow creation of a user interface +for your Python code, each of which has its own merits:</p> + +<ul> + <li> The Carbon package gives low-level access to the old Macintosh toolbox + calls for windows, events, dialogs and more. The <tt>FrameWork</tt> module + wraps these in a minimal framework. For documentation see the Macintosh + Library section of the <a href="doc/index.html">Python Language and runtime + documentation</a> and the Human Interface Toolbox section of + <a href="help:openbook=Carbon">Apple's Carbon Documentation</a>. + This solution is compatible with MacPython-OS9.</li> + <li> The <tt>W</tt> framework is built on top of this, and easier to use. + The MacPython IDE uses W. Some documentation is available on + <a href="http://www.nevada.edu/~cwebster/Python/index.html">Corran Webster's website</a>. + Compatible with MacPython-OS9.</li> +</ul> + +<p>For new work, however, one of the following packages may be better suited. +They may be available out of the box in this distribution, otherwise you +can install them through the <a href="packman.html">Package Manager</a>:</p> + +<ul> + <li> <a href="http://pyobjc.sourceforge.net/">PyObjC</a> allows complete access to Cocoa. + In technical terms it is a + bidirectional bridge between Python and Objectve-C, similar to Apple's Java + bridge. Probably the best choice for Mac OS X-only applications, but at the + time of this writing PyObjC is still in beta.</li> + + <li> <a href="http://wxpython.sourceforge.net/">wxPython</a> gives Python programs + access to the wxWindows GUI toolkit. Many people consider this + the best open source cross-platform GUI solution available today.</li> + + <li> Tkinter is the oldest cross-platform GUI toolkit for Python, bridging Python + to Tcl/Tk. If you install AquaTk it creates a native user interface on Mac OS X. + Documented in the Library section, Tkinter subsection of the + <a href="doc/index.html">Python Language and runtime documentation</a>. Tkinter + is not available for MacPython-OS9.</li> +</ul> + +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif Binary files differnew file mode 100644 index 0000000..da9325d --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/IDE.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif Binary files differnew file mode 100644 index 0000000..baa400e --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/entering_in_new_window.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif Binary files differnew file mode 100644 index 0000000..c7390af --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/hello_world.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html new file mode 100644 index 0000000..a169f5e --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/index.html @@ -0,0 +1,222 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <title>One Day of MacPython IDE Toying</title> + <link rel="SHORTCUT ICON" href="../pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="../pythonsmall.gif"> +</head> +<body bgcolor="#ffffff"> + <h1>One Day of MacPython IDE Toying</h1> + <table> + <tr> + <td> + <img src="IDE.gif" alt=""> + </td> + <td> + <p>This document gives a very basic introduction to the + MacPython <b>I</b>ntegrated <b>D</b>evelopment <b>E</b>nvironment (IDE) on Mac OS. It was + written specifically for MacPython 2.3 on Mac OS X, but most of + it is applicable to MacPython-OS9 too. It is based on + <a href="http://www-hkn.eecs.berkeley.edu/~dyoo/python/idle_intro/">"One + Day of IDLE Toying"</a> by Danny Yoo, which you should read if + you want to use the cross-platform IDLE Python development + environment.</p> + + </td> + </tr> + </table> + <hr> + <br style="page-break-after: always"> + +<p>Ok, let's assume that we've already installed Python. (If not, we can +visit: <a href="http://www.cwi.nl/~jack/macpython.html">http://www.cwi.nl/~jack/macpython.html</a> +or <a href="http://python.org">http://python.org</a> +and download the most recent Python interpreter. Get the Mac OSX binary +installer.) The first thing we'd like to do is actually start running it! +We can do this by opening up the IDE, which should be in Applications +under the newly-created MacPython program folder: </p><p><img +src="loading_ide.gif" border=1 alt="image of IDE icon"></p> + +<hr><br style="page-break-after: always"> + +<p>The IDE starts up and shows an interactive window: </p> +<p><img src="new_ide_window.gif" alt="image of new window"></p> + +<p>If the window does not show up (because you have run the IDE before +and closed it: it remembers that between runs) open it with the <tt>Windows->Python Interactive</tt> +menu entry. </p> + +<p>This is the interactive window to the IDE, it allows us to enter +commands directly into Python, and as soon as we enter a command, +Python will execute it and spit its result back to us. We'll be +using this interactive window a lot when we're exploring Python: it's +very nice because we get back our results immediately. If it helps, +we can think of it as a very powerful calculator.</p> + +<hr><br style="page-break-after: always"> + +<p>Let's try something now! As per tradition, let's get Python to say +the immortal words, "Hello World". <img src="hello_world.gif" +border=1 alt="image of hello world program"></p> <p>Those '<tt>>>></tt>' signs act as a prompt +for us: Python is ready to read in a new command by giving us that +visual cue. Also, we notice that as we enter commands, Python will +give us its output immediately. +</p> + +<hr><br style="page-break-after: always"> + +<p>Ok, this seems pretty simple enough. Let's try a few more +commands. If we look below:</p> + +<p><img src="simple_commands.gif" border=1 alt="image of command window"></p> + +<p>we'll see the result of running a few more commands. Don't worry +too much about knowing the exact rules for making programs yet: the +idea is that we can experiment with Python by typing in commands. If +things don't work, then we can correct the mistake, and try it +again.</p> + +<p>If you got to this point, you now know enough to start playing +around with Python! Crack open one of the tutorials from the <a +href="http://python.org/doc/Newbies.html">Python For Beginners</a> web +page, and start exploring with the interpreter. No time limit here. *grin*</p> + +<hr><br style="page-break-after: always"> + +<p>Now that we've paddled long enough, we might be asking: ok, this is +neat, but if we close down Python and start it up again, how do we get +the computer to remember what we typed?</p> + +<p>The solution is a little subtle: we can't directly save what's in +the interpreter window, because it will include both our commands and +the system's responses. What we'd like is to make a prepared file, +with just our own commands, and to be able to save that file as a +document. When we're in the mood, we can later open that file and +"run" Python over it, saving us the time of retyping the whole +thing over again.</p> + +<p>Let's try this. First, let's start with a clean slate by opening +up a new window.</p> + +<p><img src="making_new_window.gif" border=1 alt="image of making new window"></p> + +<p>Here's the result of that menu command:</p> + +<p><img src="new_window_made.gif" border=1 alt="image of new window"></p> + +<p>We notice that there's nothing in this new window. What this means +is that this file is purely for our commands: Python won't interject +with its own responses as we enter the program, that is, not until we +tell it to. This is called an edit window, and it is very similar +to edit windows in other editors such as TextEdit or BBEdit.</p> + +<hr><br style="page-break-after: always"> + +<p>What we wanted to do before was save some of the stuff we had +tried out on the interpreter window. Let's do that by typing (or +copy/pasting) those commands into our edit window.</p> +<p><img src="entering_in_new_window.gif" border=1 alt="image of entering commands"></p> + +<p>Ok, we're done with copying and pasting. +One big thing to notice +is that we're careful to get rid of the "<tt>>>></tt>" +prompts because they're not really part of our program. The +interpreter uses them just to tell us that we're in the interpreter, +but now that we're editing in a separate file, we can remove the +artifacts that the interpreter introduces. +I have added +an extra empty print statement so our output ends with a newline. +</p> + +<hr><br style="page-break-after: always"> + +<p>Let's save the file now. The Save command is located under the <tt>File</tt> menu:</p> +<p><img src="saving_edited_file.gif" border=1 alt="image of saving file"></p> + + +<hr><br style="page-break-after: always"> + +<p>Now that we've saved the program, how do we run the program? Use the +Run All button at the top of the editing window, or the equivalent +menu command <tt>Python->Run Window</tt>. The output will appear in a new +window called Output Window. </p> + +<p>By the way, one thing to notice is that I made a typo: I didn't +quite copy exactly what I had entered in the interpreter window +before. Does this affect things?</p> + +<p><img src="syntax_error.gif" border=1 alt="image of syntax error"></p> + +<p>Ooops. Here is an example of what Python calls a "syntax error". +Python sees that we made a typo, and warns us to take a much closer +look at our program. The designers of Python feel that having the +system point out the error is better than trying to guess at what the +programmer meant. Press the Edit button and you will be brought to +the trouble spot. </p> + +<p>Python is often perceptive enough to direct us toward the problem, +and in this case, it's telling us that we forgot to put something at +the end of this line. In this case, we need to add a +quotation mark at the end. Let's add that in now.</p> + +<p>Other errors, which usually occur later, when your program has +already done something, result in a different dialog that allows you +to look at variables and such in addition to showing you where +the error occurred. </p> + +<hr><br style="page-break-after: always"> + +<p>Ok, let's say that we fixed that silly typo. Let's try to run the +program again. This gives us a new window, the Output window, showing +the output of our program:</p> +<p><img src="output_window.gif" border=1 alt="image of output window"></p> + +<hr><br style="page-break-after: always"> + +<p>As we play with Python, we'll find ourselves "switching modes" +between the Interpreter window and the edit window. However, +if we try anything more complicated than two or three lines it +is often a good idea to work in an edit window. Align +your edit and output window such that you can see them at the same time.</p> + +<p>This is pretty much all we need to know about the MacPython IDE to actually do +interesting things. There is a lot more to the IDE, here is a quick +breakdown of things to see and explore:</p> + +<ul> + <li>All sorts of edit commands such as find and replace can be + used in the editor windows. See the <tt>Edit</tt> menu.</li> + + <li>The bottom of the edit window has the scrollbar, but at the + left are two navigation devices: a line number box that you can type + numbers into to quickly go to a specific place, and a popup menu + that lists all classes, functions and methods in your file.</li> + + <li>Above the vertical scrollbar you find another popup menu, this + influences how the Run command works. You should try the debugger + some time! If you do, and you wonder what the new small column on + the left of your script is: you can click in it to make Python stop + when it reaches this line so you can inspect things. The profiler + is also nifty: it shows you where your program is spending its time.</li> + + <li>The module browser (<tt>Python->Module Browser</tt>) shows you all Python + modules currently loaded. You can look at the contents of the module with + Browse... and (for modules written in Python) at the source with Source...</li> + + <li>The Package Manager (under the <tt>File</tt> menu, also available as a + separate application) allows you to easily install Python extension packages + for all sorts of things: scientific computation, image processing, + building user interfaces and more. </li> + + <li>The <tt>Help</tt> menu gives you quick access to both the Python documentation, + if you have installed it with the Package Manager, and the Apple Developer + documentation. </li> + + <li>The <tt>File->Save as Applet</tt> menu command saves your script as a MacOSX + application. This allows you to create a script that you can drop files on, + and much more. The IDE itself is such an applet, completely written in Python. </li> + +</ul> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif Binary files differnew file mode 100644 index 0000000..e7cca3d --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/loading_ide.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif Binary files differnew file mode 100644 index 0000000..d2022c8 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/making_new_window.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif Binary files differnew file mode 100644 index 0000000..7268a84 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_ide_window.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif Binary files differnew file mode 100644 index 0000000..dd6cca3 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/new_window_made.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif Binary files differnew file mode 100644 index 0000000..568dcb5 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/output_window.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif Binary files differnew file mode 100644 index 0000000..6e5c926 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/saving_edited_file.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif Binary files differnew file mode 100644 index 0000000..1dba570 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/simple_commands.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif Binary files differnew file mode 100644 index 0000000..2e95b87 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/ide/syntax_error.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/index.html b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html new file mode 100644 index 0000000..ef12c10 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/index.html @@ -0,0 +1,51 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>MacPython Help</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> + <META NAME="AppleTitle" CONTENT="MacPython Help"> +</head> +<body> + +<h1>MacPython Help</h1> + <table> + <tr> + <td> + <img src="python.gif" width="128" height="128" align="top" alt=""> + </td> + <td> +<p>Choose a topic, or enter keywords into the search field:</p> +<ul> + <li><a href="intro.html">What is MacPython?</a> + </li> + <li><a href="ide/index.html">MacPython + Integrated Development Environment Introduction</a> + </li> + <li><a href="doc/index.html">Python Language and runtime documentation</a> + </li> + <li><a href="finder.html">Running Python scripts from the Finder</a> + </li> + <li><a href="shell.html">Running Python scripts from the Unix Shell</a> + </li> + <li><a href="gui.html">Creating a User Interface with MacPython</a> + </li> + <li><a href="scripting.html">Controlling other Applications from MacPython</a> + </li> + <li><a href="packman.html">Installing additional functionality with the + Package Manager</a> + </li> + <li><a href="community.html">MacPython community</a> + </li> +</ul> + + </td> + </tr> + </table> + <hr> + +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html new file mode 100644 index 0000000..f0ab371 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/intro.html @@ -0,0 +1,76 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>What is MacPython?</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>What is MacPython?</h1> + <table> + <tr> + <td> + <img src="python.gif" width="128" height="128" align="top" alt=""> + </td> + <td> +<p>Python is a programming language. MacPython is a package containing +that programming language plus Mac-specific tools and extensions.</p> + + </td> + </tr> + </table> + <hr> + +<h2>The Python Language</h2> +<p>The Python programming language is available for many hardware +platforms, and most general documentation is Unix- or Windows-centered. Keep +this in mind when reading the rest of this help, or information on the web. +</p> + +<p>The Python website, <a href="http://www.python.org">www.python.org</a>, +has a <em>Beginners Guide</em> section including an +<a href="http://python.org/doc/essays/blurb.html">executive summary</a> on +the language and a +<a href="http://python.org/doc/essays/comparisons.html">comparison</a> of Python +to other languages. Or read the (rather longwinded) Python +Tutorial in the <a href="doc/index.html">Python Language and runtime documentation</a>.</p> + +<p>MacPython contains a complete <a href="shell.html">unix interpreter</a> so +if you are familiar with Python on unix you should feel right at home.</p> + +<h2>MacPython additions</h2> + +<p>The MacPython Integrated Development Environment (IDE) allows +easy editing, running and debugging of scripts. Read the +<a href="ide/index.html">Introduction +to the IDE</a> to whet your appetite.</p> + +<p>MacPython comes with lots of modules that allow access to +MacOS-specific technology, such as Carbon, Quicktime and AppleScript. +See the <em>Macintosh +Modules</em> section of the +<a href="doc/index.html">Python Language and runtime documentation</a>, +but please keep in mind that some information there still pertains to +Mac OS 9. + +Full access to the Cocoa APIs +and tools such as Interface Builder is available separately through the +<a href="packman.html">Package Manager</a>.</p> + +<p>The <a href="packman.html">Package Manager</a> also gives you access to extension +packages for cross-platform GUI development (Tkinter, wxPython, PyOpenGL), +image processing (PIL), scientific +computing (Numeric) and much more. <em>PyObjC</em> deserves a special mention: it allows +transparent access to Cocoa and Interface Builder, similar to what Java provides, +thereby making Python a first class citizen in the Mac OS X developer world. </p> + +<p>Python scripts can be saved as <em>applets</em>, semi-standalone applications +that work just like a normal application. Additionally you can even create +true standalone application that have everything embedded and can be +shipped to anyone, without the need to install Python. You do <em>not</em> +need to install the Apple Developer Tools for this. </p> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html new file mode 100644 index 0000000..355e0da --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/packman.html @@ -0,0 +1,64 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Python Package Manager</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>Installing additional Python Packages</h1> + <table> + <tr> + <td> + <img src="PackageManager.gif" width="128" height="128" align="top" alt=""> + </td> + <td> + <p>The Python Package Manager helps you installing additional + packages that enhance Python. It determines the exact MacOS version + and Python version you have and uses that information to download + a database that has packages that are test and tried on that + combination. In other words: if something is in your Package Manager + window but does not work you are free to blame the database maintainer.</p> + + <p>PackageManager then checks which of the packages you have installed + and which ones not. This should also work when you have installed packages + outside of PackageManager. + You can select packages and install them, and PackageManager will work + out the requirements and install these too.</p> + + <p>Often PackageManager will list a package in two flavors: binary + and source. Binary should always work, source will only work if + you have installed the Apple Developer Tools. PackageManager will warn + you about this, and also about other external dependencies.</p> + + <p>PackageManager is available as a separate application and also + as a function of the IDE, through the <tt>File->Package Manager</tt> menu + entry. </p> + + <h2>Troubleshooting</h2> + + <p>If package manager fails to open the database first check that you are + connected to the internet. If you are connected then the problem + could be that there is no database (yet?) for your version of Mac OS X. + You may be able to find an alternative + database that works for your system at + <a href="http://www.python.org/packman">http://www.python.org/packman</a>. + In the standalone Package Manager you can then open such an alternative database + with the <tt>File->Open URL...</tt> command, but you should realize that + you are now on untested ground.</p> + + <p>Another potential problem source is that you are behind a firewall. This version + of PackageManager uses the Unix method of setting a firewall: you need to set the + environment variable <tt>http_proxy</tt> to <tt>"http://<i>proxyhost</i>:<i>port</i>"</tt>. + See <a href="http://developer.apple.com/qa/qa2001/qa1067.html">Apple Technical + Q&A QA1067</a> for instructions.</p> + + </td> + </tr> + </table> + <hr> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif Binary files differnew file mode 100644 index 0000000..3d4aa5d --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/python.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif Binary files differnew file mode 100644 index 0000000..440225e --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/pythonsmall.gif diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html new file mode 100644 index 0000000..16321cb --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/scripting.html @@ -0,0 +1,53 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Controlling other Applications from MacPython</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>Controlling other Applications from MacPython</h1> + +<p>Python has a fairly complete implementation of the Open Scripting +Architecure (OSA, also commonly referred to as AppleScript), allowing +you to control scriptable applications from your Python program, +and with a fairly pythonic interface. This piece of +Python:</p> + +<blockquote><pre><tt> +import Finder + +f = Finder.Finder() +print f.get(f.window(1).name) +</tt></pre></blockquote> + +<p>is identical to the following piece of AppleScript:</p> + +<blockquote><pre><tt> +tell application "Finder" + get name of window 1 +end tell +</tt></pre></blockquote> + +<p>To send AppleEvents to an application you must first create the Python +modules interfacing to the terminology of the application (what +<tt>Script Editor</tt> calls the "Dictionary"). Use the IDE menu command +<tt>File->Generate OSA Suite...</tt> for this. For more control run</p> + +<blockquote><tt> +pythonw .../Lib/plat-mac/gensuitemodule.py --help +</tt></blockquote> + +<p>from a terminal window.</p> + +<h2>Creating a scriptable application in Python</h2> + +You can also create a scriptable application in Python, but this is not +very well documented. For Carbon +applications you should look at the <tt>MiniAEFrame</tt> module. + +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html new file mode 100644 index 0000000..56f5646 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/Documentation/shell.html @@ -0,0 +1,52 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" + "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"> +<html lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> + <title>Python and the Unix Shell</title> + <meta name="generator" content="BBEdit 6.5.3"> + <link rel="SHORTCUT ICON" href="pythonsmall.gif"> + <META NAME="AppleIcon" CONTENT="pythonsmall.gif"> +</head> +<body> +<h1>Running Python scripts from the Unix Shell</h1> + <table> + <tr> + <td> + <img src="python.gif" width="128" height="128" align="top" alt=""> + </td> + <td> + <p>MacPython 2.3 installs a perfectly normal Unix commandline + python interpreter in <tt>/usr/local/bin/python</tt>. As of Mac OS X 10.2, however, + <tt>/usr/local/bin</tt> is not on the search path of your shell. Moreover, + Apple's python 2.2, which lives in <tt>/usr/bin</tt> <em>is</em> on your + search path, so this can lead to confusion.</p> + + <p>If you use <tt>tcsh</tt> you should add the following line + to the file <tt>.login</tt> in your home directory and restart Terminal: + <br> + <tt>setenv PATH /usr/local/bin:$PATH</tt> + </p> + + <p>If you use <tt>bash</tt> or <tt>zsh</tt> + you should add the following line + to the file <tt>.profile</tt> in your home directory and restart Terminal: + <br> + <tt>export PATH=/usr/local/bin:$PATH</tt> + </p> + + <h2>GUI scripts</h2> + + <p>Due to the way MacOS handles windowing applications you need to run + <em>all</em> scripts that use the window manager (be it through + Carbon, Cocoa, Tkinter, wxPython, PyOpenGL or anything else) with the + <tt>pythonw</tt> interpreter, also installed in <tt>/usr/local/bin</tt>.</p> + + <p>Running with <tt>python</tt> results in an inability to bring the + script to the front, or interacting with it. </p> + </td> + </tr> + </table> + <hr> +</body> +</html> diff --git a/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings b/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 0000000..f8a8bc1 --- /dev/null +++ b/Mac/Resources/app/Resources/English.lproj/InfoPlist.strings diff --git a/Mac/Resources/app/Resources/PythonApplet.icns b/Mac/Resources/app/Resources/PythonApplet.icns Binary files differnew file mode 100644 index 0000000..c8aad9f --- /dev/null +++ b/Mac/Resources/app/Resources/PythonApplet.icns diff --git a/Mac/Resources/app/Resources/PythonInterpreter.icns b/Mac/Resources/app/Resources/PythonInterpreter.icns Binary files differnew file mode 100644 index 0000000..e09fd38 --- /dev/null +++ b/Mac/Resources/app/Resources/PythonInterpreter.icns |