[Python-checkins] CVS: python/dist/src/Lib/lib-tk turtle.py,1.1,1.2
Martin v. Löwis
python-dev@python.org
Sun, 1 Oct 2000 10:52:04 -0700
Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory slayer.i.sourceforge.net:/tmp/cvs-serv15647
Modified Files:
turtle.py
Log Message:
Don't rename Tkinter to Tk; closes bug 115714
Subclass Error from Exception.
Index: turtle.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/turtle.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** turtle.py 1998/12/04 16:42:46 1.1
--- turtle.py 2000/10/01 17:52:01 1.2
***************
*** 3,8 ****
from math import * # Also for export
import Tkinter
! Tk = Tkinter
! Error = Exception
class RawPen:
--- 3,8 ----
from math import * # Also for export
import Tkinter
! class Error(Exception):
! pass
class RawPen:
***************
*** 86,90 ****
try:
id = self._canvas.create_line(0, 0, 0, 0, fill=color)
! except Tk.TclError:
raise Error, "bad color string: %s" % `color`
self._color = color
--- 86,90 ----
try:
id = self._canvas.create_line(0, 0, 0, 0, fill=color)
! except Tkinter.TclError:
raise Error, "bad color string: %s" % `color`
self._color = color
***************
*** 223,227 ****
self._canvas.after(10)
self._canvas.itemconfigure(item, arrow="none")
! except Tk.TclError:
# Probably the window was closed!
return
--- 223,227 ----
self._canvas.after(10)
self._canvas.itemconfigure(item, arrow="none")
! except Tkinter.TclError:
# Probably the window was closed!
return
***************
*** 243,251 ****
global _root, _canvas
if _root is None:
! _root = Tk.Tk()
_root.wm_protocol("WM_DELETE_WINDOW", self._destroy)
if _canvas is None:
# XXX Should have scroll bars
! _canvas = Tk.Canvas(_root, background="white")
_canvas.pack(expand=1, fill="both")
RawPen.__init__(self, _canvas)
--- 243,251 ----
global _root, _canvas
if _root is None:
! _root = Tkinter.Tk()
_root.wm_protocol("WM_DELETE_WINDOW", self._destroy)
if _canvas is None:
# XXX Should have scroll bars
! _canvas = Tkinter.Canvas(_root, background="white")
_canvas.pack(expand=1, fill="both")
RawPen.__init__(self, _canvas)