[Python-checkins] python/dist/src/Lib/lib-tk Tkinter.py, 1.162.2.2, 1.162.2.3

jhylton@users.sourceforge.net jhylton at users.sourceforge.net
Sun Oct 16 07:24:33 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/lib-tk
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27718/Lib/lib-tk

Modified Files:
      Tag: ast-branch
	Tkinter.py 
Log Message:
Merge head to branch (for the last time)


Index: Tkinter.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/lib-tk/Tkinter.py,v
retrieving revision 1.162.2.2
retrieving revision 1.162.2.3
diff -u -d -r1.162.2.2 -r1.162.2.3
--- Tkinter.py	7 Jan 2005 06:58:39 -0000	1.162.2.2
+++ Tkinter.py	16 Oct 2005 05:24:00 -0000	1.162.2.3
@@ -1599,8 +1599,15 @@
             raise RuntimeError, \
             "Tk 4.0 or higher is required; found Tk %s" \
             % str(TkVersion)
+        # Create and register the tkerror and exit commands
+        # We need to inline parts of _register here, _ register
+        # would register differently-named commands.
+        if self._tclCommands is None:
+            self._tclCommands = []
         self.tk.createcommand('tkerror', _tkerror)
         self.tk.createcommand('exit', _exit)
+        self._tclCommands.append('tkerror')
+        self._tclCommands.append('exit')
         if _support_default_root and not _default_root:
             _default_root = self
         self.protocol("WM_DELETE_WINDOW", self.destroy)
@@ -1645,12 +1652,6 @@
     def __getattr__(self, attr):
         "Delegate attribute access to the interpreter object"
         return getattr(self.tk, attr)
-    def __hasattr__(self, attr):
-        "Delegate attribute access to the interpreter object"
-        return hasattr(self.tk, attr)
-    def __delattr__(self, attr):
-        "Delegate attribute access to the interpreter object"
-        return delattr(self.tk, attr)
 
 # Ideally, the classes Pack, Place and Grid disappear, the
 # pack/place/grid methods are defined on the Widget class, and



More information about the Python-checkins mailing list