Sophie

Sophie

distrib > Mageia > 9 > armv7hl > media > core-release-src > by-pkgid > e9b16b443cb7a93e20ab5239a88a7e18 > files > 3

tix-8.4.3-15.mga9.src.rpm

diff -Nrup a/library/pref/WmDefault.py b/library/pref/WmDefault.py
--- a/library/pref/WmDefault.py	2001-12-09 06:03:09.000000000 +0100
+++ b/library/pref/WmDefault.py	2020-02-26 06:41:08.000000000 +0100
@@ -24,7 +24,7 @@ require Tix, but is Tix enabled.
 """
 
 import os, sys, traceback, string
-import tkMessageBox
+import tkinter.messagebox
 
 def setup(root, wm=''):
     """1) find the files and/or settings (::wm_default::setup).
@@ -45,7 +45,7 @@ def setup(root, wm=''):
         text = "Error loading WmDefault\n"
         for line in traceback.format_exception(t,v,tb): text = text + line + '\n'
         try:
-            tkMessageBox.showerror ('WmDefault Error', text)
+            tkinter.messagebox.showerror ('WmDefault Error', text)
         except:
             sys.stderr.write( text )
 
@@ -59,8 +59,7 @@ def addoptions(root, cnf=None, **kw):
     if cnf is None:
         return root.tk.splitlist(root.tk.call('::wm_default::addoptions'))
     return root.tk.splitlist(
-        apply(root.tk.call,
-              ('::wm_default::addoptions',) + root._options(cnf,kw)))
+        root.tk.call(*('::wm_default::addoptions',) + root._options(cnf,kw)))
 
 def getoptions(root):
     """Returns the current settings, as a dictionary.
@@ -83,14 +82,14 @@ if __name__ == "__main__":
     if len(sys.argv) > 0:
         # Assume the name of the file containing the tixinspect Tcl source
         # is the same as argument on the command line with .tcl
-	dir = os.path.dirname(sys.argv[0])
+        dir = os.path.dirname(sys.argv[0])
     if not dir or not os.path.isdir(dir) or not os.path.isabs(dir):
         # Or, assume it's in the same directory as this one:
         dir = os.getcwd()
-    import Tkinter
-    root = Tkinter.Tk()
+    import tkinter
+    root = tkinter.Tk()
     setup(root)
     addoptions(root, {'foreground': 'red'})
     retval = getoptions(root)
-    print retval
+    print(retval)