diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index dd3b035b06..3eb11fdc7f 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -42,6 +42,12 @@ Changed the build to make one big extension module instead of one for the core and each contrib. This allowed me to do away with the libwxPyHelpers.so on unix systems. +Lots of little fixes here and there. + +Some hacks on wxGTK to try and make the AutoComplete listbox in the +wxStyledTextCtrl to behave better. It's still not as nice as on +wxMSW, but at least it's a bit more usable now. + diff --git a/wxPython/demo/About.py b/wxPython/demo/About.py index baf208298c..ffa8c3785d 100644 --- a/wxPython/demo/About.py +++ b/wxPython/demo/About.py @@ -13,8 +13,9 @@ class MyAboutBox(wxDialog):
-

wxPython %s

- Running on Python %s +
+

wxPython %s

+ Running on Python %s
diff --git a/wxPython/demo/XMLtreeview.py b/wxPython/demo/XMLtreeview.py index 853bd40b8e..c53e4010c9 100644 --- a/wxPython/demo/XMLtreeview.py +++ b/wxPython/demo/XMLtreeview.py @@ -1,9 +1,16 @@ -import string +import string, sys + +py2 = sys.version[0] == '2' from wxPython.wx import * try: - from xml.parsers import pyexpat + if py2: + from xml.parsers import expat + parsermodule = expat + else: + from xml.parsers import pyexpat + parsermodule = pyexpat haveXML = true except ImportError: haveXML = false @@ -12,7 +19,8 @@ except ImportError: if not haveXML: def runTest(frame, nb, log): - dlg = wxMessageDialog(frame, 'This demo requires the XML package. See http://www.python.org/sigs/xml-sig/', + dlg = wxMessageDialog(frame, 'This demo requires the XML package. ' + 'See http://www.python.org/sigs/xml-sig/', 'Sorry', wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() @@ -26,6 +34,8 @@ else: # Define a handler for start element events def StartElement(self, name, attrs ): + if py2: + name = name.encode() id = self.AppendItem(self.nodeStack[-1], name) self.nodeStack.append(id) @@ -34,12 +44,14 @@ else: def CharacterData(self, data ): if string.strip(data): + if py2: + data = data.encode() self.AppendItem(self.nodeStack[-1], data) def LoadTree(self, filename): # Create a parser - Parser = pyexpat.ParserCreate() + Parser = parsermodule.ParserCreate() # Tell the parser what the start element handler is Parser.StartElementHandler = self.StartElement diff --git a/wxPython/demo/wxScrolledWindow.py b/wxPython/demo/wxScrolledWindow.py index e018d18e10..3b6edadb14 100644 --- a/wxPython/demo/wxScrolledWindow.py +++ b/wxPython/demo/wxScrolledWindow.py @@ -81,6 +81,9 @@ class MyCanvas(wxScrolledWindow): dc.DrawRectangle(50,500,50,50) dc.DrawRectangle(100,500,50,50) + dc.SetPen(pen1) + dc.DrawEllipticArc(200, 500, 50, 75, 0, 90) + #from wxPython import dch #dch.FillRect(dc, wxRect(50, 400, 50, 50), wxBLACK) diff --git a/wxPython/distrib/wxPython.WSM b/wxPython/distrib/wxPython.WSM index 5d765f8bc2..e97e3cece9 100644 Binary files a/wxPython/distrib/wxPython.WSM and b/wxPython/distrib/wxPython.WSM differ diff --git a/wxPython/distrib/wxPython.wse b/wxPython/distrib/wxPython.wse index d7af0db18a..6af1f933ca 100644 --- a/wxPython/distrib/wxPython.wse +++ b/wxPython/distrib/wxPython.wse @@ -81,6 +81,10 @@ item: Set Variable Variable=PYTHONVER Value=1.5 end +item: Set Variable + Variable=SAMEDIR + Value=1 +end item: Remark end item: Get Registry Key Value @@ -813,11 +817,24 @@ item: Install File Destination=%SYS%\Msvcrt.dll Flags=0000001010000011 end +item: If/While Statement + Variable=SAMEDIR + Value=0 +end item: Install File Source=c:\projects\wx\lib\wx22_2.dll Destination=%SYS%\wx22_2.dll Flags=0000001010010010 end +item: Else Statement +end +item: Install File + Source=c:\projects\wx\lib\wx22_2.dll + Destination=%MAINDIR%\wxPython\wx22_2.dll + Flags=0000000010010010 +end +item: End Block +end item: Install File Source=c:\Projects\wx\wxPython\wxPython\*.py Destination=%MAINDIR%\wxPython @@ -1332,7 +1349,7 @@ item: Custom Dialog Set end item: Push Button Rectangle=90 68 153 82 - Alternate=0%MAINDIR%\wxPython\README.txt + Alternate=0%MAINDIR%\wxPython\docs\README.txt Action=6 Enabled Color=00000000000000001111111111111111 Create Flags=01010000000000010000000000000000 diff --git a/wxPython/distrib/zipit.bat b/wxPython/distrib/zipit.bat index ee24243f01..a2e5f2f19f 100755 --- a/wxPython/distrib/zipit.bat +++ b/wxPython/distrib/zipit.bat @@ -4,24 +4,25 @@ rem **** Make a directory to build up a distribution tree md _distrib_zip md _distrib_zip\wxPython-%1 -rem **** Copy the license files -copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1 -copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1 +REM rem **** Copy the license files +REM copy %WXWIN%\docs\gpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\lgpl.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licence.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\licendoc.txt _distrib_zip\wxPython-%1 +REM copy %WXWIN%\docs\preamble.txt _distrib_zip\wxPython-%1 -rem **** Make a zip fron the live files -zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp +REM rem **** Make a zip fron the live files +REM zip -@ -r _distrib_zip\temp.zip < distrib\wxPython.rsp -rem **** Unzip it in our build dir -cd _distrib_zip\wxPython-%1 -unzip ..\temp.zip +REM rem **** Unzip it in our build dir +REM cd _distrib_zip\wxPython-%1 +REM unzip ..\temp.zip -rem **** zip up the build dir -cd .. -zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1 +REM rem **** zip up the build dir +REM cd .. +REM zip -r ..\distrib\wxPython-src-%1.zip wxPython-%1 +cd _distrib_zip rem **** copy the docs into the tree md wxPython-%1\docs diff --git a/wxPython/src/grid.i b/wxPython/src/grid.i index 37f0db23a5..6902ace135 100644 --- a/wxPython/src/grid.i +++ b/wxPython/src/grid.i @@ -669,7 +669,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { @@ -796,23 +796,6 @@ public: wxGridCellChoiceEditor(int LCOUNT = 0, const wxString* choices = NULL, bool allowOthers = FALSE); -#ifdef PRE2115 - %addmethods { - wxGridCellChoiceEditor(PyObject* choices, - bool allowOthers = FALSE) { - - const char** temp = string_LIST_helper(choices); - if (temp) { - int count = PyList_Size(choices); - wxGridCellChoiceEditor* ret; - ret = new wxGridCellChoiceEditor(count, temp, allowOthers); - delete [] temp; - return ret; - } - return NULL; - } - } -#endif }; //--------------------------------------------------------------------------- diff --git a/wxPython/src/gtk/grid.cpp b/wxPython/src/gtk/grid.cpp index 8c53e7f5c3..fc7ac4a285 100644 --- a/wxPython/src/gtk/grid.cpp +++ b/wxPython/src/gtk/grid.cpp @@ -595,7 +595,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 153c71d92e..d08ad0f767 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -574,23 +574,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _arg0; @@ -4923,7 +4906,6 @@ static PyMethodDef misccMethods[] = { { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc.py b/wxPython/src/gtk/misc.py index 6285642f01..d3cc3b8580 100644 --- a/wxPython/src/gtk/misc.py +++ b/wxPython/src/gtk/misc.py @@ -649,8 +649,6 @@ wxUsleep = miscc.wxUsleep wxYield = miscc.wxYield -wxSafeYield = miscc.wxSafeYield - wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows wxGetResource = miscc.wxGetResource diff --git a/wxPython/src/gtk/misc2.cpp b/wxPython/src/gtk/misc2.cpp index 05ad994f1f..6da4946e08 100644 --- a/wxPython/src/gtk/misc2.cpp +++ b/wxPython/src/gtk/misc2.cpp @@ -1207,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -4944,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = { { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/misc2.py b/wxPython/src/gtk/misc2.py index b624c93873..ab39918201 100644 --- a/wxPython/src/gtk/misc2.py +++ b/wxPython/src/gtk/misc2.py @@ -561,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent wxWakeUpIdle = misc2c.wxWakeUpIdle +wxSafeYield = misc2c.wxSafeYield + wxShowTip = misc2c.wxShowTip def wxCreateFileTipProvider(*_args, **_kwargs): diff --git a/wxPython/src/misc.i b/wxPython/src/misc.i index ae74f5fe83..94e2143b05 100644 --- a/wxPython/src/misc.i +++ b/wxPython/src/misc.i @@ -292,7 +292,6 @@ wxString wxGetOsDescription(); void wxSleep(int secs); void wxUsleep(unsigned long milliseconds); bool wxYield(); -bool wxSafeYield(); void wxEnableTopLevelWindows(bool enable); %inline %{ diff --git a/wxPython/src/misc2.i b/wxPython/src/misc2.i index b5e98b74a1..8e80dd6a2a 100644 --- a/wxPython/src/misc2.i +++ b/wxPython/src/misc2.i @@ -366,6 +366,8 @@ public: void wxPostEvent(wxEvtHandler *dest, wxEvent& event); void wxWakeUpIdle(); +bool wxSafeYield(wxWindow* win=NULL); + //---------------------------------------------------------------------- diff --git a/wxPython/src/msw/grid.cpp b/wxPython/src/msw/grid.cpp index af082c2d20..e7acb3f64c 100644 --- a/wxPython/src/msw/grid.cpp +++ b/wxPython/src/msw/grid.cpp @@ -595,7 +595,7 @@ public: } - wxGridCellEditor *Clone() const { + wxGridCellEditor*Clone() const { wxGridCellEditor* rval = NULL; bool doSave = wxPyRestoreThread(); if (m_myInst.findCallback("Clone")) { diff --git a/wxPython/src/msw/misc.cpp b/wxPython/src/msw/misc.cpp index 8a6dc99e9b..d92648165e 100644 --- a/wxPython/src/msw/misc.cpp +++ b/wxPython/src/msw/misc.cpp @@ -591,23 +591,6 @@ static PyObject *_wrap_wxYield(PyObject *self, PyObject *args, PyObject *kwargs) return _resultobj; } -static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { - PyObject * _resultobj; - bool _result; - char *_kwnames[] = { NULL }; - - self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxSafeYield",_kwnames)) - return NULL; -{ - wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxSafeYield(); - - wxPy_END_ALLOW_THREADS; -} _resultobj = Py_BuildValue("i",_result); - return _resultobj; -} - static PyObject *_wrap_wxEnableTopLevelWindows(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _arg0; @@ -4940,7 +4923,6 @@ static PyMethodDef misccMethods[] = { { "wxStripMenuCodes", (PyCFunction) _wrap_wxStripMenuCodes, METH_VARARGS | METH_KEYWORDS }, { "wxGetResource", (PyCFunction) _wrap_wxGetResource, METH_VARARGS | METH_KEYWORDS }, { "wxEnableTopLevelWindows", (PyCFunction) _wrap_wxEnableTopLevelWindows, METH_VARARGS | METH_KEYWORDS }, - { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxYield", (PyCFunction) _wrap_wxYield, METH_VARARGS | METH_KEYWORDS }, { "wxUsleep", (PyCFunction) _wrap_wxUsleep, METH_VARARGS | METH_KEYWORDS }, { "wxSleep", (PyCFunction) _wrap_wxSleep, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc.py b/wxPython/src/msw/misc.py index baf05cc603..e2ad047487 100644 --- a/wxPython/src/msw/misc.py +++ b/wxPython/src/msw/misc.py @@ -651,8 +651,6 @@ wxUsleep = miscc.wxUsleep wxYield = miscc.wxYield -wxSafeYield = miscc.wxSafeYield - wxEnableTopLevelWindows = miscc.wxEnableTopLevelWindows wxGetResource = miscc.wxGetResource diff --git a/wxPython/src/msw/misc2.cpp b/wxPython/src/msw/misc2.cpp index a5a11c6ba7..2cb28625ff 100644 --- a/wxPython/src/msw/misc2.cpp +++ b/wxPython/src/msw/misc2.cpp @@ -1207,6 +1207,32 @@ static PyObject *_wrap_wxWakeUpIdle(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxSafeYield(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + bool _result; + wxWindow * _arg0 = (wxWindow *) NULL; + PyObject * _argo0 = 0; + char *_kwnames[] = { "win", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|O:wxSafeYield",_kwnames,&_argo0)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxSafeYield. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + _result = (bool )wxSafeYield(_arg0); + + wxPy_END_ALLOW_THREADS; +} _resultobj = Py_BuildValue("i",_result); + return _resultobj; +} + static PyObject *_wrap_wxShowTip(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; @@ -4944,6 +4970,7 @@ static PyMethodDef misc2cMethods[] = { { "wxDragIcon", (PyCFunction) _wrap_wxDragIcon, METH_VARARGS | METH_KEYWORDS }, { "wxCreateFileTipProvider", (PyCFunction) _wrap_wxCreateFileTipProvider, METH_VARARGS | METH_KEYWORDS }, { "wxShowTip", (PyCFunction) _wrap_wxShowTip, METH_VARARGS | METH_KEYWORDS }, + { "wxSafeYield", (PyCFunction) _wrap_wxSafeYield, METH_VARARGS | METH_KEYWORDS }, { "wxWakeUpIdle", (PyCFunction) _wrap_wxWakeUpIdle, METH_VARARGS | METH_KEYWORDS }, { "wxPostEvent", (PyCFunction) _wrap_wxPostEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCaret_SetBlinkTime", (PyCFunction) _wrap_wxCaret_SetBlinkTime, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/msw/misc2.py b/wxPython/src/msw/misc2.py index b624c93873..ab39918201 100644 --- a/wxPython/src/msw/misc2.py +++ b/wxPython/src/msw/misc2.py @@ -561,6 +561,8 @@ wxPostEvent = misc2c.wxPostEvent wxWakeUpIdle = misc2c.wxWakeUpIdle +wxSafeYield = misc2c.wxSafeYield + wxShowTip = misc2c.wxShowTip def wxCreateFileTipProvider(*_args, **_kwargs): diff --git a/wxPython/src/msw/wx.cpp b/wxPython/src/msw/wx.cpp index 5764e8a6b6..8738b39e4c 100644 --- a/wxPython/src/msw/wx.cpp +++ b/wxPython/src/msw/wx.cpp @@ -646,6 +646,10 @@ extern "C" SWIGEXPORT(void) inithtmlhelpc(); extern "C" SWIGEXPORT(void) initcalendarc(); extern "C" SWIGEXPORT(void) initstreamsc(); extern "C" SWIGEXPORT(void) initfilesysc(); + +extern "C" SWIGEXPORT(void) initglcanvasc(); +extern "C" SWIGEXPORT(void) initoglc(); +extern "C" SWIGEXPORT(void) initstc_c(); #ifdef __cplusplus extern "C" { #endif @@ -2966,6 +2970,10 @@ SWIGEXPORT(void) initwxc() { inithtmlc(); inithtmlhelpc(); initcalendarc(); + + initglcanvasc(); + initoglc(); + initstc_c(); { int i; for (i = 0; _swig_mapping[i].n1; i++) diff --git a/wxPython/wxPython/lib/mvctree.py b/wxPython/wxPython/lib/mvctree.py index 9a8703e4cd..aa37dec0c8 100644 --- a/wxPython/wxPython/lib/mvctree.py +++ b/wxPython/wxPython/lib/mvctree.py @@ -616,7 +616,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(kid, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (kid, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not kid.expanded: dc.DrawLine(px, py -2, px, py + 3) @@ -627,7 +627,7 @@ class TreePainter(Painter): dc.SetPen(self.linepen) dc.SetBrush(self.bgbrush) dc.DrawRectangle(px -4, py-4, 9, 9) - self.knobs.append(node, Rect(px -4, py -4, 9, 9)) + self.knobs.append( (node, Rect(px -4, py -4, 9, 9)) ) dc.SetPen(self.textpen) if not node.expanded: dc.DrawLine(px, py -2, px, py + 3) diff --git a/wxPython/wxPython/lib/wxPlotCanvas.py b/wxPython/wxPython/lib/wxPlotCanvas.py index e302cb1010..7cd16a3c52 100644 --- a/wxPython/wxPython/lib/wxPlotCanvas.py +++ b/wxPython/wxPython/lib/wxPlotCanvas.py @@ -184,7 +184,7 @@ class PlotCanvas(wx.wxWindow): def OnPaint(self, event): pdc = wx.wxPaintDC(self) if self.last_draw is not None: - apply(self.draw, self.last_draw + (pdc,)) + apply(self.draw, self.last_draw + (pdc,)) def reconfigure(self, event): (new_width,new_height) = self.GetClientSizeTuple() @@ -342,7 +342,7 @@ class PlotCanvas(wx.wxWindow): ticks = [] t = -grid*Numeric.floor(-lower/grid) while t <= upper: - ticks.append(t, format % (t,)) + ticks.append( (t, format % (t,)) ) t = t + grid return ticks