summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-08-03 13:31:36 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-08-03 13:31:36 (GMT)
commitcbed91b4db6817b7bbbb12ede40bfb5d26a9bf14 (patch)
tree1995f01bd8828ae9647ad407e40dd8584ca843da
parentcb60dae6a1a7841138421866ea15870f6297cf8b (diff)
downloadcpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.zip
cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.gz
cpython-cbed91b4db6817b7bbbb12ede40bfb5d26a9bf14.tar.bz2
Merging appropriate 2.1.1 fixes back into the main trunk.
-rw-r--r--Mac/Contrib/osam/OSAm.prjbin49980 -> 80703 bytes
-rw-r--r--Mac/Contrib/osam/ScriptRunner.c19
-rw-r--r--Mac/Demo/PICTbrowse/ICONbrowse.py4
-rw-r--r--Mac/Demo/PICTbrowse/PICTbrowse.py4
-rw-r--r--Mac/Demo/PICTbrowse/PICTbrowse2.py6
-rw-r--r--Mac/Demo/PICTbrowse/oldPICTbrowse.py6
-rw-r--r--Mac/Demo/mlte/mlted.py4
-rw-r--r--Mac/Demo/textedit/ped.py4
-rw-r--r--Mac/Demo/waste/htmled.py7
-rw-r--r--Mac/Demo/waste/swed.py4
-rw-r--r--Mac/Demo/waste/wed.py4
-rw-r--r--Mac/Distributions/(vise)/Python 2.1.vctbin495919 -> 579113 bytes
-rw-r--r--Mac/Distributions/binary.include12
-rw-r--r--Mac/Distributions/dev.include19
-rw-r--r--Mac/Include/macbuildno.h2
-rw-r--r--Mac/Include/pythonresources.h3
-rw-r--r--Mac/Lib/FrameWork.py4
-rw-r--r--Mac/Modules/ae/aescan.py1
-rw-r--r--Mac/Modules/macfsmodule.c27
-rw-r--r--Mac/Modules/res/resscan.py1
-rw-r--r--Mac/Python/macglue.c2
-rw-r--r--Mac/Python/macmain.c5
-rw-r--r--Mac/ReadMe28
-rw-r--r--Mac/Relnotes116
-rw-r--r--Mac/Resources/dialogs.rsrcbin18027 -> 18570 bytes
-rw-r--r--Mac/_checkversion.py2
26 files changed, 162 insertions, 122 deletions
diff --git a/Mac/Contrib/osam/OSAm.prj b/Mac/Contrib/osam/OSAm.prj
index 3215c1c..87ce163 100644
--- a/Mac/Contrib/osam/OSAm.prj
+++ b/Mac/Contrib/osam/OSAm.prj
Binary files differ
diff --git a/Mac/Contrib/osam/ScriptRunner.c b/Mac/Contrib/osam/ScriptRunner.c
index 7fd68f6..bf77d6b 100644
--- a/Mac/Contrib/osam/ScriptRunner.c
+++ b/Mac/Contrib/osam/ScriptRunner.c
@@ -21,7 +21,26 @@
#include <script.h>
#include <resources.h>
+#ifdef TARGET_API_MAC_CARBON
+static
+p2cstr(StringPtr p)
+{
+ unsigned char *c = p;
+ int len = c[0];
+ strncpy((char *)c+1, (char *)c, len);
+ c[len] = 0;
+}
+static c2pstr(const char *cc)
+{
+ char *c = (char *)cc; /* Ouch */
+ int len = strlen(c);
+
+ if ( len > 255 ) len = 255;
+ strncpy(c, c+1, len);
+ c[0] = len;
+}
+#endif
OSAError LoadScriptingComponent (ComponentInstance * scriptingComponent);
diff --git a/Mac/Demo/PICTbrowse/ICONbrowse.py b/Mac/Demo/PICTbrowse/ICONbrowse.py
index c827fac..865ff9e 100644
--- a/Mac/Demo/PICTbrowse/ICONbrowse.py
+++ b/Mac/Demo/PICTbrowse/ICONbrowse.py
@@ -119,9 +119,9 @@ class MyDialog(FrameWork.DialogWindow):
def open(self, id, contents):
self.id = id
FrameWork.DialogWindow.open(self, ID_MAIN)
- self.wid.SetDialogDefaultItem(MAIN_SHOW)
+ self.dlg.SetDialogDefaultItem(MAIN_SHOW)
self.contents = contents
- self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+ self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart,
Controls.kControlListBoxListHandleTag)
self.list = List.as_List(h)
diff --git a/Mac/Demo/PICTbrowse/PICTbrowse.py b/Mac/Demo/PICTbrowse/PICTbrowse.py
index 04d321c..da32b50 100644
--- a/Mac/Demo/PICTbrowse/PICTbrowse.py
+++ b/Mac/Demo/PICTbrowse/PICTbrowse.py
@@ -97,9 +97,9 @@ class MyDialog(FrameWork.DialogWindow):
def open(self, id, contents):
self.id = id
FrameWork.DialogWindow.open(self, ID_MAIN)
- self.wid.SetDialogDefaultItem(MAIN_SHOW)
+ self.dlg.SetDialogDefaultItem(MAIN_SHOW)
self.contents = contents
- self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+ self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart,
Controls.kControlListBoxListHandleTag)
self.list = List.as_List(h)
diff --git a/Mac/Demo/PICTbrowse/PICTbrowse2.py b/Mac/Demo/PICTbrowse/PICTbrowse2.py
index 903fd9b..56440f2 100644
--- a/Mac/Demo/PICTbrowse/PICTbrowse2.py
+++ b/Mac/Demo/PICTbrowse/PICTbrowse2.py
@@ -98,7 +98,7 @@ class PICTwindow(FrameWork.Window):
def fitrect(self):
"""Return self.pictrect scaled to fit in window"""
- graf = self.wid.GetWindowPort()
+ graf = self.dlg.GetWindowPort()
screenrect = graf.portRect
picwidth = self.pictrect[2] - self.pictrect[0]
picheight = self.pictrect[3] - self.pictrect[1]
@@ -119,9 +119,9 @@ class MyDialog(FrameWork.DialogWindow):
def open(self, id, contents):
self.id = id
FrameWork.DialogWindow.open(self, ID_MAIN)
- self.wid.SetDialogDefaultItem(MAIN_SHOW)
+ self.dlg.SetDialogDefaultItem(MAIN_SHOW)
self.contents = contents
- self.ctl = self.wid.GetDialogItemAsControl(MAIN_LIST)
+ self.ctl = self.dlg.GetDialogItemAsControl(MAIN_LIST)
h = self.ctl.GetControlData_Handle(Controls.kControlListBoxPart,
Controls.kControlListBoxListHandleTag)
self.list = List.as_List(h)
diff --git a/Mac/Demo/PICTbrowse/oldPICTbrowse.py b/Mac/Demo/PICTbrowse/oldPICTbrowse.py
index 72a29de..0012958 100644
--- a/Mac/Demo/PICTbrowse/oldPICTbrowse.py
+++ b/Mac/Demo/PICTbrowse/oldPICTbrowse.py
@@ -96,8 +96,8 @@ class MyDialog(FrameWork.DialogWindow):
def open(self, id, contents):
self.id = id
FrameWork.DialogWindow.open(self, ID_MAIN)
- self.wid.SetDialogDefaultItem(MAIN_SHOW)
- tp, h, rect = self.wid.GetDialogItem(MAIN_LIST)
+ self.dlg.SetDialogDefaultItem(MAIN_SHOW)
+ tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST)
rect2 = rect[0]+1, rect[1]+1, rect[2]-17, rect[3]-17 # Scroll bar space
self.list = List.LNew(rect2, (0, 0, 1, len(contents)), (0,0), 0, self.wid,
0, 1, 1, 1)
@@ -145,7 +145,7 @@ class MyDialog(FrameWork.DialogWindow):
self.parent.showPICT(resid)
def do_rawupdate(self, window, event):
- tp, h, rect = self.wid.GetDialogItem(MAIN_LIST)
+ tp, h, rect = self.dlg.GetDialogItem(MAIN_LIST)
Qd.SetPort(self.wid)
Qd.FrameRect(rect)
self.list.LUpdate(self.wid.GetWindowPort().visRgn)
diff --git a/Mac/Demo/mlte/mlted.py b/Mac/Demo/mlte/mlted.py
index 0f78693..10d5698 100644
--- a/Mac/Demo/mlte/mlted.py
+++ b/Mac/Demo/mlte/mlted.py
@@ -24,7 +24,7 @@ class MlteWindow(Window):
self.path = path
self.name = name
r = windowbounds(400, 400)
- w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
+ w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
flags = MacTextEditor.kTXNDrawGrowIconMask|MacTextEditor.kTXNWantHScrollBarMask| \
MacTextEditor.kTXNWantVScrollBarMask
@@ -361,6 +361,8 @@ class Mlted(Application):
def idle(self, event):
if self.active:
self.active.do_idle(event)
+ else:
+ Qd.SetCursor(Qd.qd.arrow)
def main():
Mlte.TXNInitTextension(0)
diff --git a/Mac/Demo/textedit/ped.py b/Mac/Demo/textedit/ped.py
index 9b222a3..529ac12 100644
--- a/Mac/Demo/textedit/ped.py
+++ b/Mac/Demo/textedit/ped.py
@@ -19,7 +19,7 @@ class TEWindow(ScrolledWindow):
self.path = path
self.name = name
r = windowbounds(400, 400)
- w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
+ w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
x0, y0, x1, y1 = self.wid.GetWindowPort().portRect
x0 = x0 + 4
@@ -338,6 +338,8 @@ class Ped(Application):
def idle(self, *args):
if self.active:
self.active.do_idle()
+ else:
+ Qd.SetCursor(Qd.qd.arrow)
def main():
App = Ped()
diff --git a/Mac/Demo/waste/htmled.py b/Mac/Demo/waste/htmled.py
index 7643947..4d29e1e 100644
--- a/Mac/Demo/waste/htmled.py
+++ b/Mac/Demo/waste/htmled.py
@@ -15,7 +15,6 @@ import Scrap
import os
import macfs
import MACFS
-import regsub
import string
import htmllib
@@ -47,7 +46,7 @@ class WasteWindow(ScrolledWindow):
self.path = path
self.name = name
r = windowbounds(400, 400)
- w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
+ w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
vr = LEFTMARGIN, 0, r[2]-r[0]-15, r[3]-r[1]-15
dr = (0, 0, vr[2], 0)
@@ -445,7 +444,7 @@ class WasteWindow(ScrolledWindow):
self.ted.WEInsert(data, None, None)
def send_literal_data(self, data):
- data = regsub.gsub('\n', '\r', data)
+ data = string.replace(data, '\n', '\r')
data = string.expandtabs(data)
self.ted.WEInsert(data, None, None)
@@ -775,6 +774,8 @@ class Wed(Application):
def idle(self, event):
if self.active:
self.active.do_idle(event)
+ else:
+ Qd.SetCursor(Qd.qd.arrow)
def newRuler(self, obj):
"""Insert a new ruler. Make it as wide as the window minus 2 pxls"""
diff --git a/Mac/Demo/waste/swed.py b/Mac/Demo/waste/swed.py
index b62fd9a..e4622da 100644
--- a/Mac/Demo/waste/swed.py
+++ b/Mac/Demo/waste/swed.py
@@ -34,7 +34,7 @@ class WasteWindow(ScrolledWindow):
self.path = path
self.name = name
r = windowbounds(400, 400)
- w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
+ w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15
dr = (0, 0, 10240, 0)
@@ -603,6 +603,8 @@ class Wed(Application):
def idle(self, event):
if self.active:
self.active.do_idle(event)
+ else:
+ Qd.SetCursor(Qd.qd.arrow)
def getfontnames():
names = []
diff --git a/Mac/Demo/waste/wed.py b/Mac/Demo/waste/wed.py
index 7b40864..342d52e 100644
--- a/Mac/Demo/waste/wed.py
+++ b/Mac/Demo/waste/wed.py
@@ -25,7 +25,7 @@ class WasteWindow(ScrolledWindow):
self.path = path
self.name = name
r = windowbounds(400, 400)
- w = Win.NewWindow(r, name, 1, 0, -1, 1, 0x55555555)
+ w = Win.NewWindow(r, name, 1, 0, -1, 1, 0)
self.wid = w
vr = 0, 0, r[2]-r[0]-15, r[3]-r[1]-15
dr = (0, 0, 10240, 0)
@@ -411,6 +411,8 @@ class Wed(Application):
def idle(self, event):
if self.active:
self.active.do_idle(event)
+ else:
+ Qd.SetCursor(Qd.qd.arrow)
def main():
App = Wed()
diff --git a/Mac/Distributions/(vise)/Python 2.1.vct b/Mac/Distributions/(vise)/Python 2.1.vct
index d86b1be..1c38af1 100644
--- a/Mac/Distributions/(vise)/Python 2.1.vct
+++ b/Mac/Distributions/(vise)/Python 2.1.vct
Binary files differ
diff --git a/Mac/Distributions/binary.include b/Mac/Distributions/binary.include
index c1ca530..4701bfc 100644
--- a/Mac/Distributions/binary.include
+++ b/Mac/Distributions/binary.include
@@ -105,6 +105,10 @@
(':Mac:Build', None)
(':Mac:Compat:Icon', None)
(':Mac:Contrib:AECaptureParser', '')
+(':Mac:Contrib:BBPy.lm:BBpy.r', None)
+(':Mac:Contrib:BBPy.lm:Python', '')
+(':Mac:Contrib:BBPy.lm:Python Keywords.rsrc', None)
+(':Mac:Contrib:BBPy.lm:PythonBBLM.txt', '')
(':Mac:Contrib:BBPy:PythonSlave.py', '')
(':Mac:Contrib:BBPy:README', '')
(':Mac:Contrib:BBPy:Run as Python', '')
@@ -208,7 +212,7 @@
(':pystone.py', None)
(':setup.py', None)
(':site-packages', None)
-(':Mac:Contrib:BBPy.lm:Python', '')
-(':Mac:Contrib:BBPy.lm:PythonBBLM.txt', '')
-(':Mac:Contrib:BBPy.lm:BBpy.r', None)
-(':Mac:Contrib:BBPy.lm:Python Keywords.rsrc', None)
+(':Extensions:example3:README', None)
+(':Extensions:example2:README', None)
+(':Extensions:example:README', None)
+(':Mac:Contrib:osam:OSAm.carbon.slb', '')
diff --git a/Mac/Distributions/dev.include b/Mac/Distributions/dev.include
index 4fae0e1..ff3f0c8 100644
--- a/Mac/Distributions/dev.include
+++ b/Mac/Distributions/dev.include
@@ -116,6 +116,9 @@
(':Mac:Build:TE.mcp.exp', None)
(':Mac:Build:TE.mcp.xml', None)
(':Mac:Build:TE.mcp.xml.out', None)
+(':Mac:Build:_dummy_tkinter.mcp', None)
+(':Mac:Build:_dummy_tkinter.mcp.exp', None)
+(':Mac:Build:_dummy_tkinter.old.mcp', None)
(':Mac:Build:_symtable.carbon.mcp', None)
(':Mac:Build:_symtable.carbon.mcp.exp', None)
(':Mac:Build:_symtable.carbon.mcp.xml', None)
@@ -452,6 +455,16 @@
(':readmefiles', None)
(':setup.py', None)
(':site-packages', None)
-(':Mac:Build:_dummy_tkinter.old.mcp', None)
-(':Mac:Build:_dummy_tkinter.mcp.exp', None)
-(':Mac:Build:_dummy_tkinter.mcp', None)
+(':Extensions:example', None)
+(':Extensions:example2', None)
+(':Extensions:example3', None)
+(':Mac:Demo:mlte:mlted.py', None)
+(':Mac:Build:Mlte.mcp.xml', None)
+(':Mac:Build:Mlte.mcp.exp', None)
+(':Mac:Build:Mlte.mcp', None)
+(':Mac:Build:Mlte.carbon.mcp.xml', None)
+(':Mac:Build:Mlte.carbon.mcp.exp', None)
+(':Mac:Build:Mlte.carbon.mcp', None)
+(':Mac:Build:CF.carbon.mcp.xml', None)
+(':Mac:Build:CF.carbon.mcp.exp', None)
+(':Mac:Build:CF.carbon.mcp', None)
diff --git a/Mac/Include/macbuildno.h b/Mac/Include/macbuildno.h
index d3337c2..1956b4d 100644
--- a/Mac/Include/macbuildno.h
+++ b/Mac/Include/macbuildno.h
@@ -1 +1 @@
-#define BUILD 92
+#define BUILD 97
diff --git a/Mac/Include/pythonresources.h b/Mac/Include/pythonresources.h
index 29026a8..9f8b2c4 100644
--- a/Mac/Include/pythonresources.h
+++ b/Mac/Include/pythonresources.h
@@ -95,6 +95,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* No preferences file name resource */
#define NOPREFNAME_ID BASE_ID+9
+/* Not a script */
+#define NOTASCRIPT_ID BASE_ID+10
+
/* EditPythonPrefs range. Needed here to forestall conflicts with applets */
#define EDITPYTHONPREFS_MIN 508
#define EDITPYTHONPREFS_MAX 511
diff --git a/Mac/Lib/FrameWork.py b/Mac/Lib/FrameWork.py
index 4735fc4..3ee118d 100644
--- a/Mac/Lib/FrameWork.py
+++ b/Mac/Lib/FrameWork.py
@@ -1010,6 +1010,10 @@ class DialogWindow(Window):
def close(self):
self.do_postclose()
+ def do_postclose(self):
+ self.dlg = None
+ Window.do_postclose(self)
+
def do_itemhit(self, item, event):
print 'Dialog %s, item %d hit'%(self.dlg, item)
diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py
index 7007b4a..2852f13 100644
--- a/Mac/Modules/ae/aescan.py
+++ b/Mac/Modules/ae/aescan.py
@@ -5,7 +5,6 @@
import sys
import os
import string
-import regsub
import MacOS
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
diff --git a/Mac/Modules/macfsmodule.c b/Mac/Modules/macfsmodule.c
index 5e34a64..e6f11ae 100644
--- a/Mac/Modules/macfsmodule.c
+++ b/Mac/Modules/macfsmodule.c
@@ -367,6 +367,7 @@ _mfs_GetFSSpecFromFSSpec(PyObject *self, FSSpec *fssp)
static int
_mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
{
+#if !TARGET_API_MAC_OS8
static FSRef *fsrp;
if ( is_mfsrobject(self) ) {
@@ -374,6 +375,7 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
if ( FSGetCatalogInfo(&((mfsrobject *)self)->fsref, kFSCatInfoNone, NULL, NULL, fssp, NULL) == noErr )
return 1;
}
+#endif
return 0;
}
@@ -381,10 +383,12 @@ _mfs_GetFSSpecFromFSRef(PyObject *self, FSSpec *fssp)
static int
_mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp)
{
+#if !TARGET_API_MAC_OS8
if ( is_mfsrobject(self) ) {
*fsrp = ((mfsrobject *)self)->fsref;
return 1;
}
+#endif
return 0;
}
@@ -392,10 +396,12 @@ _mfs_GetFSRefFromFSRef(PyObject *self, FSRef *fsrp)
static int
_mfs_GetFSRefFromFSSpec(PyObject *self, FSRef *fsrp)
{
+#if !TARGET_API_MAC_OS8
if ( is_mfssobject(self) ) {
if ( FSpMakeFSRef(&((mfssobject *)self)->fsspec, fsrp) == noErr )
return 1;
}
+#endif
return 0;
}
@@ -524,6 +530,10 @@ mfss_FSpMakeFSRef(self, args)
mfssobject *self;
PyObject *args;
{
+#if TARGET_API_MAC_OS8
+ PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform");
+ return 0;
+#else
OSErr err;
FSRef fsref;
@@ -535,6 +545,7 @@ mfss_FSpMakeFSRef(self, args)
return NULL;
}
return (PyObject *)newmfsrobject(&fsref);
+#endif
}
/* XXXX These routines should be replaced by a wrapper to the *FInfo routines */
@@ -766,7 +777,7 @@ statichere PyTypeObject Mfsstype = {
/* End of code for FSSpec objects */
/* -------------------------------------------------------- */
-
+#if !TARGET_API_MAC_OS8
static PyObject *
mfsr_as_fsspec(self, args)
mfsrobject *self;
@@ -871,6 +882,7 @@ statichere PyTypeObject Mfsrtype = {
};
/* End of code for FSRef objects */
+#endif /* !TARGET_API_MAC_OS8 */
/* -------------------------------------------------------- */
static PyObject *
@@ -1002,11 +1014,16 @@ mfs_FSRef(self, args)
PyObject *self; /* Not used */
PyObject *args;
{
+#if TARGET_API_MAC_OS8
+ PyErr_SetString(PyExc_NotImplementedError, "FSRef objects not supported on this platform");
+ return 0;
+#else
FSRef fsr;
if (!PyArg_ParseTuple(args, "O&", PyMac_GetFSRef, &fsr))
return NULL;
return (PyObject *)newmfsrobject(&fsr);
+#endif
}
static PyObject *
@@ -1172,6 +1189,9 @@ static struct PyMethodDef mfs_methods[] = {
int
PyMac_GetFSRef(PyObject *v, FSRef *fsr)
{
+#if TARGET_API_MAC_OS8
+ return 0;
+#else
OSErr err;
/* If it's an FSRef we're also okay. */
@@ -1186,12 +1206,17 @@ PyMac_GetFSRef(PyObject *v, FSRef *fsr)
}
PyErr_SetString(PyExc_TypeError, "FSRef argument should be existing FSRef, FSSpec or (OSX only) pathname");
return 0;
+#endif
}
/* Convert FSSpec to PyObject */
PyObject *PyMac_BuildFSRef(FSRef *v)
{
+#if TARGET_API_MAC_OS8
+ return NULL;
+#else
return (PyObject *)newmfsrobject(v);
+#endif
}
/*
diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py
index 5b68623..d748adb 100644
--- a/Mac/Modules/res/resscan.py
+++ b/Mac/Modules/res/resscan.py
@@ -5,7 +5,6 @@
import sys
import os
import string
-import regsub
import MacOS
BGENDIR=os.path.join(sys.prefix, ':Tools:bgen:bgen')
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index c760107..5fdfe55 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -227,7 +227,7 @@ char *PyMac_getscript()
case smCyrillic:
return "mac-cyrillic";
default:
- return "mac-roman"; /* better than nothing */
+ return "ascii"; /* better than nothing */
}
}
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c
index 10c5a5f..b82395c 100644
--- a/Mac/Python/macmain.c
+++ b/Mac/Python/macmain.c
@@ -486,6 +486,11 @@ PyMac_InitApplication()
PyMac_FixGUSIcd();
#endif
}
+ /* Check that the first argument is a text file */
+ if ( PyMac_getfiletype(argv[1]) != 'TEXT' ) {
+ Alert(NOTASCRIPT_ID, NULL);
+ exit(0);
+ }
}
Py_Main(argc, argv);
}
diff --git a/Mac/ReadMe b/Mac/ReadMe
index adf6214..86b7a45 100644
--- a/Mac/ReadMe
+++ b/Mac/ReadMe
@@ -1,11 +1,9 @@
-How to install Python 2.1 on your Macintosh
--------------------------------------------
+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. This is also the first MacPython distribution
-to be packaged as an active installer, which only downloads the parts you actually
-need. Let me hear about problems in these areas.
+use the Carbon version or not.
You should definitely read the Relnotes file too.
@@ -13,8 +11,6 @@ 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 you installed a 2.1 beta on MacOSX you MUST read the uninstall section below.
-
------
If this is your first encounter with Python: you definitely need the
@@ -30,7 +26,7 @@ now. The documentation is in HTML format, start with index.html.
Caveats
-------
-Aside from the general new Python 2.1 features compared to 2.0 the main
+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
@@ -82,8 +78,8 @@ After installing
It is probably a good idea to run the automatic tests. Start
Python and "import test.autotest".
-Two tests will fail on MacOS9, both with MemoryErrors:
-test_longexp and test_zlib (on MacOSX nothing should fail).
+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
@@ -108,7 +104,7 @@ 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 Preferences" file in the Python subfolder in 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.
@@ -117,7 +113,7 @@ 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. This final 2.1 installer always copies the shared libraries on OSX, so it does
+too. The final 2.1 installer always copied the shared libraries on OSX, so it does
not have the problem anymore.
Things to see
@@ -157,9 +153,9 @@ 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 works as expected you can trash
+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".
+"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
@@ -191,8 +187,8 @@ 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 and all the other people who provided feedback,
-code or both!
+Tom Bridgman, Russel Owen, Pascal Oberndoerfer and all the other people
+who provided feedback, code or both!
MacPython includes waste, a TextEdit replacement which is (c) 1998 Marco Piovanelli.
diff --git a/Mac/Relnotes b/Mac/Relnotes
index 772ea56..f776efd 100644
--- a/Mac/Relnotes
+++ b/Mac/Relnotes
@@ -1,83 +1,42 @@
-Changes in 2.1 since 2.0
+Changes in 2.1.1 since 2.1
--------------------------
These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
-for machine-independent changes. Changes since 2.1b2 are
-marked with [*] and at the bottom of the list.
-
-- This release is optionally Carbon-based, so it runs natively on MacOS 8.1 or
- later and MacOSX. (Note that on MacOSX MacPython will run as a normal Mac application,
- if you want to run Python from the BSD commandline get a unix-Python distribution
- from www.python.org).
-- Alternatively there is a classic PPC interpreter as well. There are two reasons you
- might want to use this: (a) you have a pre-MacOS9 system and don't want to install
- CarbonLib, or (b) you need Tkinter, for which no Carbon version is available yet.
-- Distutils is included and seems to work. On 8.1 you may want to get Apple's
- CarbonLib installer even if you plan to run classic, it contains the newer Appearance
- Mgr which Python needs (according to rumour).
-- There's a new module (package, actually) mkcwproject which builds CodeWarrior
- projects from simple templates. See Distutils or :Mac:scripts:genpluginprojects.py
- for examples of use.
-- The Numerical extension has moved to :Lib:site-python from :Extensions. As Numerical
- is now distutils-based you can easily install newer versions when they become
- available.
-- The Help and ctb modules are not available under Carbon because that functionality is
- not in Carbon.
-- Windows and Dialogs can now be different beasts, so you may have to call
- dlg.GetDialogWindow() where you used to be able to call window methods straight
- on the dialog. This also has consequences for code using FrameWork.DialogWindow.
- THIS IS AN INCOMPATIBLE CHANGE.
-- ctl.GetControlDataHandle() has been renamed to GetControlData_Handle(), and similarly
- for the other variants of GetControlData and SetControlData. This was needed
- because Carbon defines a completely different routine with the name GetControlDataHandle.
- THIS IS AN INCOMPATIBLE CHANGE.
-- Method mac.xstat() has disappeared. THIS IS AN INCOMPATIBLE CHANGE.
-- Menu.SetPopupData() and GetPopupData() are gone. Use SetPopupMenuHandle() and
- SetPopupMenuID() (and the getters) in stead. THIS IS AN INCOMPATIBLE CHANGE.
-- Various methods have disappeared when running under Carbon. The script
- :Mac:scripts:missingcarbonmethods.py can check your sources, but you need unix to run
- it. Or use it as documentation and search by hand. THIS IS AN INCOMPATIBLE CHANGE.
-- The good news is that "direct access to toolbox structs" still works from Python,
- so Python programmers have a lot less to fix than C programmers.
- That's because the lowlevel code simply uses the accessors internally. The accessors
- are available both in Carbon and Classic MacPython.
-- Scrap under Carbon is, you guessed it, the Carbon Scrap Manager. Some workarounds are
- provided, though. THIS IS AN INCOMPATIBLE CHANGE.
-- The Internet Config routines that are missing from Carbon have been removed. This
- is no problem if you use the "ic" module, but may be if you use "icglue" directly.
- THIS IS AN INCOMPATIBLE CHANGE.
-- Various old toolbox names (CountMItems, EnableItem, etc) have disappeared. Use the
- new forms (CountMenuItems, EnableMenuItem, etc). THIS IS AN INCOMPATIBLE CHANGE.
-- Waste now uses Waste 2.0.
-- The default memory size for the interpreter has been upped again.
-- The MacOS error messages have been updated to reflect the current state of
- things. This was long overdue.
-- The crash in BuildApplication has been fixed.
-- struct.pack related problems (in Audio_Mac, for example) have been fixed.
-- (src/dev/cvs only): The project files now use the .mcp extension in stead of .prj.
- Projects for almost all plugins and the img modules are automatically generated
- with :Mac:scripts:genpluginprojects.py (also called by fullbuild). The .mcp files
- are not in the repository, if you don't want to use genpluginprojects you can import
- the .mcp.xml files in CodeWarrior.
-- ConfigurePython has been replace by two applets: ConfigurePythonClassic and
- ConfigurePythonCarbon. These will select either execution model for machines
- supporting both, and it will also build all the standard applets.
-- PythonInterpreterCarbon and PythonInterpreterClassic are now files of type "Atmp", not
- "APPL", so there should not be any confusion as to what the real application is
- (PythonInterpreter).
-- A BBEdit language module by Chris Stern is included in the :Mac:Contrib folder.
-- The ConfigurePython applets will now detect if the preference file refers to a different
- folder than where they live. They offer to remove the preference file in this case.
-- Import case-check was broken in 2.1b1, this is fixed.
-- A side-effect of the previous fix is that getpass works again.
-- BuildApplication was broken under Carbon. Fixed.
-- Morefindertools functionality integrated into findertools. [*]
-- ped.py from Mac:Demo crashed, this has been fixed by making Win.WhichWindow more robust. [*]
-- Tkinter mainloop is now a little less aggressive in eating events. [*]
-- The Python console window is raised to the front when input is read. This fixes a hang
- (for Carbon only) when crashing with a modal dialog open. [*]
-- The menu bar is (again) restored when Python is terminating. [*]
+for machine-independent changes.
+- Handling non-ascii characters in sys.path on non-MacRoman systems should be fixed,
+ iff MacPython has a codec for the charset. Otherwise you should get an error, at least.
+ Pathnames in sys.path also retain their original case again.
+- IDE could crash on corrupt preferences. Fixed.
+- IDE will now work if you use either pre or sre as re.
+- Evt.WaitNextEvent could give an error when bit 15 was set, which could cause a problem
+ with IDE in classic mode. Fixed.
+- MacOS8.X users in classic mode had problems with Fm not loading, which also caused
+ IDE not working. Fixed.
+- Fm.IsAntiAliasedTextEnabled and Fm.SetAntiAliasedTextEnabled have gone for now, to
+ fix the problem above.
+- Disabled the Tkinter file I/O event handler, which was there but didn't work anyway.
+- Problems with loading dynamic modules that are part of a package into BuildApplication-
+ generated programs were fixed.
+- The order of the EasyDialogs yes/no/cancel buttons has been conformed to the Mac
+ standard.
+- Handling of Dialogs and Windows that were not created by Python is a bit more graceful
+ now, which may fix some crashes.
+- Ctl.SendControlMessage has gone. But it didn't work anyway.
+- Various problems with the TextEdit and Waste demos have been fixed.
+- Embedding/extending only: in preparation to allowing the use of MacPython modules in
+ unix-Python on OSX the xxx_New and xxx_Convert routines are now optionally vectored via
+ glue routines in macglue.c. The only change that may be needed for embedders/extenders is
+ that you may want to include pymactoolbox.h in your sources.
+- Embedding/extending only: Most MacPython source is now much more Mach-O friendly, and
+ should work with Universal Headers 3.4.
+- Experimental: an Mlte module has been added, an interface to the Multi Lingual Text
+ Engine. There is a minimal example in :Mac:Demos:mlte.
+- Experimental: some support for FSRef objects has been added. You can do little more that
+ convert them to/from FSSpecs. Carbon only.
+- Experimental: the CF module has some support for CoreFoundation types. CFString
+ and CFURL work, to a degree, and can be converted to/from Python strings and Unicode
+ objects. Carbon only.
What is not in this distribution
--------------------------------
@@ -92,6 +51,9 @@ Known problems
This list is probably incomplete, more problems may be listed on the MacPython homepage,
http://www.cwi.nl/~jack/macpython.html.
+- MacPython 2.1.1 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
+ machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
+ hints/clues/workarounds are solicited.
- Tkinter does not work under Carbon.
- The IDE and Tkinter do not work together. Run tkinter programs under PythonInterpreter.
- Tkinter file events do not work, unless you have opened the file through Tcl (but then
@@ -102,3 +64,5 @@ http://www.cwi.nl/~jack/macpython.html.
- PythonInterpreter used interactively will eat a lot of processor cycles. You should use
PythonIDE for interactive work and PythonInterpreter for scripts only. This is especially
true under OSX.
+- AliasMenu 2.2 conflicts with the Carbon version of Python. This is most likely a problem
+ with AliasMenu (which is from 1999, and thus predates Carbon altogether).
diff --git a/Mac/Resources/dialogs.rsrc b/Mac/Resources/dialogs.rsrc
index 52efd23..1e219b2 100644
--- a/Mac/Resources/dialogs.rsrc
+++ b/Mac/Resources/dialogs.rsrc
Binary files differ
diff --git a/Mac/_checkversion.py b/Mac/_checkversion.py
index 6efe92d..b7c6944 100644
--- a/Mac/_checkversion.py
+++ b/Mac/_checkversion.py
@@ -5,7 +5,7 @@ _checkversion.py file"""
import pyversioncheck
_PACKAGE="MacPython"
-_VERSION="2.1"
+_VERSION="2.1.1"
_URL="http://www.cwi.nl/~jack/macpythonversion.txt"
try: