summaryrefslogtreecommitdiff
path: root/Lib/lib-tk/Tix.py
diff options
context:
space:
mode:
authorCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 +0000
committerCollin Winter <collinw@gmail.com>2007-08-30 01:19:48 +0000
commitce36ad8a467d914eb5c91f33835b9eaea18ee93b (patch)
tree05bf654f3359e20b455dc300bd860bba5d291c8d /Lib/lib-tk/Tix.py
parent8b3febef2f96c35e9aad9db2ef499db040fdefae (diff)
downloadcpython-git-ce36ad8a467d914eb5c91f33835b9eaea18ee93b.tar.gz
Raise statement normalization in Lib/.
Diffstat (limited to 'Lib/lib-tk/Tix.py')
-rwxr-xr-xLib/lib-tk/Tix.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib-tk/Tix.py b/Lib/lib-tk/Tix.py
index a91b003ebe..f523d7aca6 100755
--- a/Lib/lib-tk/Tix.py
+++ b/Lib/lib-tk/Tix.py
@@ -31,7 +31,7 @@ from Tkinter import _flatten, _cnfmerge, _default_root
# WARNING - TkVersion is a limited precision floating point number
if TkVersion < 3.999:
- raise ImportError, "This version of Tix.py requires Tk 4.0 or higher"
+ raise ImportError("This version of Tix.py requires Tk 4.0 or higher")
import _tkinter # If this fails your Python may not be configured for Tk
@@ -323,7 +323,7 @@ class TixWidget(Tkinter.Widget):
def __getattr__(self, name):
if name in self.subwidget_list:
return self.subwidget_list[name]
- raise AttributeError, name
+ raise AttributeError(name)
def set_silent(self, value):
"""Set a variable without calling its action routine"""
@@ -334,7 +334,7 @@ class TixWidget(Tkinter.Widget):
the sub-class)."""
n = self._subwidget_name(name)
if not n:
- raise TclError, "Subwidget " + name + " not child of " + self._name
+ raise TclError("Subwidget " + name + " not child of " + self._name)
# Remove header of name and leading dot
n = n[len(self._w)+1:]
return self._nametowidget(n)
@@ -385,7 +385,7 @@ class TixWidget(Tkinter.Widget):
if not master:
master = Tkinter._default_root
if not master:
- raise RuntimeError, 'Too early to create image'
+ raise RuntimeError('Too early to create image')
if kw and cnf: cnf = _cnfmerge((cnf, kw))
elif kw: cnf = kw
options = ()
@@ -475,7 +475,7 @@ class DisplayStyle:
master = _default_root # global from Tkinter
if not master and 'refwindow' in cnf: master=cnf['refwindow']
elif not master and 'refwindow' in kw: master= kw['refwindow']
- elif not master: raise RuntimeError, "Too early to create display style: no root window"
+ elif not master: raise RuntimeError("Too early to create display style: no root window")
self.tk = master.tk
self.stylename = self.tk.call('tixDisplayStyle', itemtype,
*self._options(cnf,kw) )