[Debian-astro-commits] [python-pyraf] 01/03: New upstream version 2.1.14

Ole Streicher olebole at moszumanska.debian.org
Wed Jan 11 14:52:35 UTC 2017


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository python-pyraf.

commit 27d6ad808cf74cab6e14fed9a13431797591a4b1
Author: Ole Streicher <ole at aip.de>
Date:   Wed Jan 11 15:51:06 2017 +0100

    New upstream version 2.1.14
---
 PKG-INFO                       |   2 +-
 lib/pyraf.egg-info/PKG-INFO    |   2 +-
 lib/pyraf.egg-info/SOURCES.txt |   4 +-
 lib/pyraf/GkiMpl.py            |  10 ++--
 lib/pyraf/MplCanvasAdapter.py  |   1 -
 lib/pyraf/Ptkplot.py           |  23 +++-----
 lib/pyraf/aqutil.py            |  14 ++---
 lib/pyraf/epar.py              |   2 +-
 lib/pyraf/gkigcur.py           |   9 +--
 lib/pyraf/gkitkbase.py         | 131 ++++++++++++++++++++---------------------
 lib/pyraf/gkitkplot.py         |   8 +--
 lib/pyraf/gwm.py               |   4 +-
 lib/pyraf/irafdisplay.py       |   2 +-
 lib/pyraf/irafukey.py          |   2 +-
 lib/pyraf/msgiobuffer.py       |   2 +-
 lib/pyraf/msgiowidget.py       | 114 +++++++++++++++++------------------
 lib/pyraf/newWindowHack.py     |  12 ++--
 lib/pyraf/pyrafTk.py           |  15 ++---
 lib/pyraf/splash.py            |  19 +++---
 lib/pyraf/subproc.py           |   2 +-
 lib/pyraf/version.py           |   4 +-
 lib/pyraf/version_vcs.py       |   2 +-
 lib/pyraf/wutil.py             |  12 ++--
 lib/pyraf_setup.pyc            | Bin 3313 -> 3313 bytes
 required_pkgs/stsci.tools      |   2 +-
 setup.cfg                      |   2 +-
 26 files changed, 193 insertions(+), 207 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index ac4ce9f..1900438 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyraf
-Version: 2.1.11
+Version: 2.1.14
 Summary: Provides a Pythonic interface to IRAF that can be used in place of the existing IRAF CL
 Home-page: http://www.stsci.edu/resources/software_hardware/pyraf
 Author: Rick White, Perry Greenfield, Chris Sontag
diff --git a/lib/pyraf.egg-info/PKG-INFO b/lib/pyraf.egg-info/PKG-INFO
index ac4ce9f..1900438 100644
--- a/lib/pyraf.egg-info/PKG-INFO
+++ b/lib/pyraf.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyraf
-Version: 2.1.11
+Version: 2.1.14
 Summary: Provides a Pythonic interface to IRAF that can be used in place of the existing IRAF CL
 Home-page: http://www.stsci.edu/resources/software_hardware/pyraf
 Author: Rick White, Perry Greenfield, Chris Sontag
diff --git a/lib/pyraf.egg-info/SOURCES.txt b/lib/pyraf.egg-info/SOURCES.txt
index a42ec73..fff6d7a 100644
--- a/lib/pyraf.egg-info/SOURCES.txt
+++ b/lib/pyraf.egg-info/SOURCES.txt
@@ -877,8 +877,8 @@ required_pkgs/stsci.tools/.git/info/exclude
 required_pkgs/stsci.tools/.git/logs/HEAD
 required_pkgs/stsci.tools/.git/logs/refs/heads/master
 required_pkgs/stsci.tools/.git/logs/refs/remotes/origin/HEAD
-required_pkgs/stsci.tools/.git/objects/pack/pack-f16c85e988faf4e46fed9152d17fa03613bd4092.idx
-required_pkgs/stsci.tools/.git/objects/pack/pack-f16c85e988faf4e46fed9152d17fa03613bd4092.pack
+required_pkgs/stsci.tools/.git/objects/pack/pack-1e95cbf712e2ce2d21907be57218df52eafb174c.idx
+required_pkgs/stsci.tools/.git/objects/pack/pack-1e95cbf712e2ce2d21907be57218df52eafb174c.pack
 required_pkgs/stsci.tools/.git/refs/heads/master
 required_pkgs/stsci.tools/.git/refs/remotes/origin/HEAD
 required_pkgs/stsci.tools/doc/Makefile
diff --git a/lib/pyraf/GkiMpl.py b/lib/pyraf/GkiMpl.py
index 39a1a3e..300b534 100644
--- a/lib/pyraf/GkiMpl.py
+++ b/lib/pyraf/GkiMpl.py
@@ -7,7 +7,7 @@ $Id$
 from __future__ import division # confidence high
 
 import math, sys, numpy, os
-import Tkinter as Tki
+import Tkinter as TKNTR
 import matplotlib
 # (done in mca file) matplotlib.use('TkAgg') # set backend
 from matplotlib.lines import Line2D
@@ -63,8 +63,8 @@ class GkiMplKernel(gkitkbase.GkiInteractiveTkBase):
     def makeGWidget(self, width=600, height=420):
 
         """Make the graphics widget.  Also perform some self init."""
-        self.__pf = Tki.Frame(self.top)
-        self.__pf.pack(side=Tki.TOP, fill=Tki.BOTH, expand=1)
+        self.__pf = TKNTR.Frame(self.top)
+        self.__pf.pack(side=TKNTR.TOP, fill=TKNTR.BOTH, expand=1)
         self.__xsz = width
         self.__ysz = height
 
@@ -74,7 +74,7 @@ class GkiMplKernel(gkitkbase.GkiInteractiveTkBase):
         self.__fig.set_facecolor('k') # default to black
 
         self.__mca = mca.MplCanvasAdapter(self, self.__fig, master=self.__pf)
-        self.__mca.pack(side=Tki.TOP, fill=Tki.BOTH, expand=1)
+        self.__mca.pack(side=TKNTR.TOP, fill=TKNTR.BOTH, expand=1)
         self.__mca.gwidgetize(width, height) # Add attrs to the gwidget
         self.gwidget = self.__mca.get_tk_widget()
 
@@ -727,7 +727,7 @@ class tkColorManager:
 
     def setDrawingColor(self, irafColorIndex):
 
-        """Return the specified iraf color usable by Tkinter"""
+        """Return the specified iraf color usable by tkinter"""
         color = self.config.defaultColors[irafColorIndex]
         red = int(255*color[0])
         green = int(255*color[1])
diff --git a/lib/pyraf/MplCanvasAdapter.py b/lib/pyraf/MplCanvasAdapter.py
index 551ca88..e1e5de8 100644
--- a/lib/pyraf/MplCanvasAdapter.py
+++ b/lib/pyraf/MplCanvasAdapter.py
@@ -7,7 +7,6 @@ $Id$
 from __future__ import division # confidence high
 
 import os, matplotlib
-import Tkinter as Tki
 matplotlib.use('TkAgg') # set backend
 import matplotlib.backends.backend_tkagg as tkagg
 from Ptkplot import hideTkCursor
diff --git a/lib/pyraf/Ptkplot.py b/lib/pyraf/Ptkplot.py
index 7802ed4..0555dc9 100644
--- a/lib/pyraf/Ptkplot.py
+++ b/lib/pyraf/Ptkplot.py
@@ -8,7 +8,7 @@ $Id$
 from __future__ import division # confidence high
 
 import os
-from Tkinter import _default_root
+from Tkinter import _default_root # requires 2to3
 from Tkinter import *
 import wutil
 import sys, time
@@ -26,17 +26,8 @@ del dirname
 _TK_HAS_NONE_CURSOR = True # assume True until we learn otherwise
 
 if _default_root is None:
-    # create the initial Tk window and immediately withdraw it
-    import Tkinter
-    if not Tkinter._default_root:
-        _default_root = Tkinter.Tk()
-    else:
-        _default_root = Tkinter._default_root
-    _default_root.withdraw()
-    try:
-        del Tkinter
-    except NameError: # for PY3K situation, in case the 2to3 tool
-        del tkinter   # didn't rename it correctly 2 lines above this one
+    from stsci.tools import irafutils
+    _default_root = irafutils.init_tk_default_root()
 
 # This code is needed to avoid faults on sys.exit()
 # [DAA, Jan 1998]
@@ -44,13 +35,13 @@ if _default_root is None:
 
 def cleanup():
     try:
-        from Tkinter import _default_root, TclError
-        import Tkinter
+        from Tkinter import _default_root, TclError # requires 2to3
+        import Tkinter as TKNTR
         try:
             if _default_root: _default_root.destroy()
         except TclError:
             pass
-        Tkinter._default_root = None
+        TKNTR._default_root = None
     except SystemError:
         # If cleanup() is called before pyraf fully loads, we will
         # see: "SystemError: Parent module 'pyraf' not loaded".  In that case,
@@ -254,7 +245,7 @@ class PyrafCanvas(Canvas):
 
 class FullWindowCursor:
     """This implements a full window crosshair cursor.  This class can
-       operate in the xutil-wrapping mode or in a Tkinter-only mode. """
+       operate in the xutil-wrapping mode or in a tkinter-only mode. """
     # Perhaps this should inherit from an abstract Cursor class eventually
 
     def __init__(self, x, y, window):
diff --git a/lib/pyraf/aqutil.py b/lib/pyraf/aqutil.py
index b157756..d430a5e 100644
--- a/lib/pyraf/aqutil.py
+++ b/lib/pyraf/aqutil.py
@@ -1,5 +1,5 @@
 """ Contains Python routines to do special Aqua (OSX) window manipulations
-not possible in Tkinter.  In general, an attempt is made to use the Pyobjc
+not possible in tkinter.  In general, an attempt is made to use the Pyobjc
 bridging package so that compiling another C extension is not needed.
 
 $Id$
@@ -7,7 +7,7 @@ $Id$
 
 from __future__ import division # confidence high
 
-import os, struct, time, Tkinter
+import os, struct, time
 import objc
 import AppKit
 from stsci.tools.for2to3 import tobytes
@@ -181,7 +181,7 @@ def __doPyobjcWinInit():
     CGErr  = objc._C_INT
     INPSN  = tobytes('n^{ProcessSerialNumber=LL}')
     OUTPSN = tobytes('o^{ProcessSerialNumber=LL}')
-    OUTPID = tobytes('o^_C_ULNG')
+#   OUTPID = tobytes('o^_C_ULNG') # invalid as of objc v3.2
     WARPSIG = tobytes('v{CGPoint=ff}')
     if struct.calcsize("l") > 4: # is 64-bit python
         WARPSIG = tobytes('v{CGPoint=dd}')
@@ -191,14 +191,14 @@ def __doPyobjcWinInit():
          # These are public API
          ( u'GetCurrentProcess', OSErr+OUTPSN),
          ( u'GetFrontProcess', OSErr+OUTPSN),
-         ( u'GetProcessPID', OSStat+INPSN+OUTPID),
+#        ( u'GetProcessPID', OSStat+INPSN+OUTPID), # see OUTPID note
          ( u'SetFrontProcess', OSErr+INPSN),
          ( u'CGWarpMouseCursorPosition', WARPSIG),
          ( u'CGMainDisplayID', objc._C_PTR+objc._C_VOID),
          ( u'CGDisplayPixelsHigh', objc._C_ULNG+objc._C_ULNG),
          ( u'CGDisplayHideCursor', CGErr+objc._C_ULNG),
          ( u'CGDisplayShowCursor', CGErr+objc._C_ULNG),
-         # This is undocumented SPI
+         # This is undocumented API
          ( u'CPSSetProcessName', OSErr+INPSN+objc._C_CHARPTR),
          ( u'CPSEnableForegroundOperation', OSErr+INPSN),
     ]
@@ -240,9 +240,9 @@ def __doPyobjcWinInit():
         raise Exception("CPSEnableForegroundOperation: "+str(err))
 
     # Get the display's absolute height (pixels).
-    # The next line assumes the Tkinter root window has already been created
+    # The next line assumes the tkinter root window has already been created
     # (and withdrawn), but it may have not yet been.
-#   __screenHeight = Tkinter._default_root.winfo_screenheight()
+#   __screenHeight = tkinter._default_root.winfo_screenheight()
     # So, we will use the less-simple but just as viable CoreGraphics funcs.
     dispIdPtr = CGMainDisplayID() # no need to keep around?
     __screenHeight = CGDisplayPixelsHigh(dispIdPtr)
diff --git a/lib/pyraf/epar.py b/lib/pyraf/epar.py
index b1edaa7..88a6ae9 100644
--- a/lib/pyraf/epar.py
+++ b/lib/pyraf/epar.py
@@ -8,7 +8,7 @@ from __future__ import division # confidence high
 
 from stsci.tools import capable
 if capable.OF_GRAPHICS:
-    from Tkinter import *
+    from Tkinter import * # requires 2to3
     from tkMessageBox import askokcancel, showwarning, showerror
     import os, sys, cStringIO
     from stsci.tools import listdlg, eparoption, editpar, irafutils
diff --git a/lib/pyraf/gkigcur.py b/lib/pyraf/gkigcur.py
index 612bef7..5c7c422 100644
--- a/lib/pyraf/gkigcur.py
+++ b/lib/pyraf/gkigcur.py
@@ -5,15 +5,16 @@ $Id$
 """
 from __future__ import division # confidence high
 
-import string, os, sys, numpy, Tkinter
+import string, os, sys, numpy
+import Tkinter as TKNTR
 from stsci.tools import irafutils
 import wutil
 
 # The following class attempts to emulate the standard IRAF gcursor
 # mode of operation. That is to say, it is basically a keyboard driven
 # system that uses the same keys that IRAF does for the same purposes.
-# The keyboard I/O will use Tkinter event handling instead of terminal
-# I/O primarily because it is simpler and it is necessary to use Tkinter
+# The keyboard I/O will use tkinter event handling instead of terminal
+# I/O primarily because it is simpler and it is necessary to use tkinter
 # anyway.
 
 class Gcursor:
@@ -54,7 +55,7 @@ class Gcursor:
                 self.active = 0
                 self.unbind()
                 self.cursorOff()
-            except Tkinter.TclError:
+            except TKNTR.TclError:
                 pass
         # EOF flag can get set by window-close event or 'I' keystroke
         # It should be set to string message
diff --git a/lib/pyraf/gkitkbase.py b/lib/pyraf/gkitkbase.py
index a219032..8f86860 100644
--- a/lib/pyraf/gkitkbase.py
+++ b/lib/pyraf/gkitkbase.py
@@ -5,9 +5,10 @@ $Id$
 """
 from __future__ import division # confidence high
 
-import numpy, os, sys, string, time, Tkinter
+import numpy, os, sys, string, time
+import Tkinter as TKNTR # requires 2to3
 import msgiobuffer, msgiowidget, wutil
-from stsci.tools import capable, filedlg
+from stsci.tools import capable, filedlg, irafutils
 from stsci.tools.irafglobals import IrafError, userWorkingHome
 from stsci.tools.for2to3 import ndarr2bytes
 import gki, textattrib, irafgwcs
@@ -174,19 +175,17 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
             self.redrawFunctionTable[opcode] = None
 
         # Create the root window as required, but hide it
-        if Tkinter._default_root is None:
-            root = Tkinter.Tk()
-            root.withdraw()
+        irafutils.init_tk_default_root()
         # note size is just an estimate that helps window manager place window
-        self.top = Tkinter.Toplevel(visual='best',width=600,height=485)
+        self.top = TKNTR.Toplevel(visual='best',width=600,height=485)
         # Read the epar options database file
         optfile = "epar.optionDB"
         try:
             self.top.option_readfile(os.path.join(os.curdir,optfile))
-        except Tkinter.TclError:
+        except TKNTR.TclError:
             try:
                 self.top.option_readfile(os.path.join(userWorkingHome,optfile))
-            except Tkinter.TclError:
+            except TKNTR.TclError:
                 self.top.option_readfile(os.path.join(pyrafDir,optfile))
         self.top.title(windowName)
         self.top.iconname(windowName)
@@ -195,7 +194,7 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         self.makeGWidget()
         self.makeStatus()
         self.gwidget.redraw = self.redraw
-        self.gwidget.pack(side=Tkinter.TOP, expand=1, fill=Tkinter.BOTH)
+        self.gwidget.pack(side=TKNTR.TOP, expand=1, fill=TKNTR.BOTH)
         self.gwidget.bind('<Enter>', self.focusOnGwidget) # if mouse enters gw
 
         self.colorManager.setColors(self.gwidget)
@@ -211,13 +210,13 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         self.history = [(self.gkibuffer, self.wcs, "", self.getHistory())]
         self._currentPage = 0
         # Master page variable, pageVar, any change to it is watched & acted on
-        self.pageVar = Tkinter.IntVar()
+        self.pageVar = TKNTR.IntVar()
         self.pageVar.set(self._currentPage)
         # _setPageVar is callback for changes to pageVar
         self.pageVar.trace('w', self._setPageVar)
         # Also hold a var just for the # of the selected page button: bttnVar
         # This one causes no events when it is set!
-        self.bttnVar = Tkinter.IntVar()
+        self.bttnVar = TKNTR.IntVar()
         self.bttnVar.set(0)
         windowID = self.gwidget.winfo_id()
         self.flush()
@@ -241,10 +240,10 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
         if 'PYRAF_OLD_STATUS' in os.environ:
             self.top.status = msgiobuffer.MsgIOBuffer(self.top, width=600)
-            self.top.status.msgIO.pack(side=Tkinter.BOTTOM, fill = Tkinter.X)
+            self.top.status.msgIO.pack(side=TKNTR.BOTTOM, fill = TKNTR.X)
         else:
             self.top.status = msgiowidget.MsgIOWidget(self.top, width=600)
-            self.top.status.pack(side=Tkinter.BOTTOM, fill=Tkinter.X)
+            self.top.status.pack(side=TKNTR.BOTTOM, fill=TKNTR.X)
 
     # -----------------------------------------------
     # Menu bar definitions
@@ -253,19 +252,19 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
         """Make menu bar at top of window"""
 
-        self.menubar = Tkinter.Frame(self.top, bd=1, relief=Tkinter.FLAT)
+        self.menubar = TKNTR.Frame(self.top, bd=1, relief=TKNTR.FLAT)
         self.fileMenu = self.makeFileMenu(self.menubar)
         self.editMenu = self.makeEditMenu(self.menubar)
         self.pageMenu = self.makePageMenu(self.menubar)
         self.windowMenu = self.makeWindowMenu(self.menubar)
         self.helpMenu = self.makeHelpMenu(self.menubar)
-        self.menubar.pack(side=Tkinter.TOP, fill=Tkinter.X)
+        self.menubar.pack(side=TKNTR.TOP, fill=TKNTR.X)
 
     def makeFileMenu(self, menubar):
 
-        button = Tkinter.Menubutton(menubar, text='File')
-        button.pack(side=Tkinter.LEFT, padx=2)
-        button.menu = Tkinter.Menu(button, tearoff=0)
+        button = TKNTR.Menubutton(menubar, text='File')
+        button.pack(side=TKNTR.LEFT, padx=2)
+        button.menu = TKNTR.Menu(button, tearoff=0)
         button.menu.add_command(label="Print", command=self.doprint)
         button.menu.add_command(label="Save...", command=self.save)
         button.menu.add_command(label="Load...", command=self.load)
@@ -337,9 +336,9 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
     def makeEditMenu(self, menubar):
 
-        button = Tkinter.Menubutton(menubar, text='Edit')
-        button.pack(side=Tkinter.LEFT, padx=2)
-        button.menu = Tkinter.Menu(button, tearoff=0,
+        button = TKNTR.Menubutton(menubar, text='Edit')
+        button.pack(side=TKNTR.LEFT, padx=2)
+        button.menu = TKNTR.Menu(button, tearoff=0,
                 postcommand=self.editMenuInit)
         num = 0
         button.menu.add_command(label="Undo", command=self.undoN)
@@ -386,32 +385,32 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         buffer = self.getBuffer()
         if buffer.isUndoable():
             self.editMenu.menu.entryconfigure(button.undoNum,
-                    state=Tkinter.NORMAL)
+                    state=TKNTR.NORMAL)
             self.editMenu.menu.entryconfigure(button.redrawOriginalNum,
-                    state=Tkinter.NORMAL)
+                    state=TKNTR.NORMAL)
         else:
             self.editMenu.menu.entryconfigure(button.undoNum,
-                    state=Tkinter.DISABLED)
+                    state=TKNTR.DISABLED)
             self.editMenu.menu.entryconfigure(button.redrawOriginalNum,
-                    state=Tkinter.DISABLED)
+                    state=TKNTR.DISABLED)
         # disable Redo item if not redoable
         if buffer.isRedoable():
             self.editMenu.menu.entryconfigure(button.redoNum,
-                    state=Tkinter.NORMAL)
+                    state=TKNTR.NORMAL)
         else:
             self.editMenu.menu.entryconfigure(button.redoNum,
-                    state=Tkinter.DISABLED)
+                    state=TKNTR.DISABLED)
         # disable Delete items if no plots
         if len(self.history)==1 and self.isPageBlank():
             self.editMenu.menu.entryconfigure(button.deleteNum,
-                    state=Tkinter.DISABLED)
+                    state=TKNTR.DISABLED)
             self.editMenu.menu.entryconfigure(button.deleteAllNum,
-                    state=Tkinter.DISABLED)
+                    state=TKNTR.DISABLED)
         else:
             self.editMenu.menu.entryconfigure(button.deleteNum,
-                    state=Tkinter.NORMAL)
+                    state=TKNTR.NORMAL)
             self.editMenu.menu.entryconfigure(button.deleteAllNum,
-                    state=Tkinter.NORMAL)
+                    state=TKNTR.NORMAL)
 
     def deletePlot(self):
 
@@ -446,9 +445,9 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
     def makePageMenu(self, menubar):
 
-        button = Tkinter.Menubutton(menubar, text='Page')
-        button.pack(side=Tkinter.LEFT, padx=2)
-        button.menu = Tkinter.Menu(button, tearoff=1,
+        button = TKNTR.Menubutton(menubar, text='Page')
+        button.pack(side=TKNTR.LEFT, padx=2)
+        button.menu = TKNTR.Menu(button, tearoff=1,
                 postcommand=self.pageMenuInit)
         num = 1 # tearoff is entry 0 on menu
         button.nextNum = num
@@ -478,24 +477,24 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         page = self._currentPage
         # Next
         if page < len(self.history)-1:
-            menu.entryconfigure(button.nextNum, state=Tkinter.NORMAL)
+            menu.entryconfigure(button.nextNum, state=TKNTR.NORMAL)
         else:
-            menu.entryconfigure(button.nextNum, state=Tkinter.DISABLED)
+            menu.entryconfigure(button.nextNum, state=TKNTR.DISABLED)
         # Back
         if page>0:
-            menu.entryconfigure(button.backNum, state=Tkinter.NORMAL)
+            menu.entryconfigure(button.backNum, state=TKNTR.NORMAL)
         else:
-            menu.entryconfigure(button.backNum, state=Tkinter.DISABLED)
+            menu.entryconfigure(button.backNum, state=TKNTR.DISABLED)
         # First
         if page>0:
-            menu.entryconfigure(button.firstNum, state=Tkinter.NORMAL)
+            menu.entryconfigure(button.firstNum, state=TKNTR.NORMAL)
         else:
-            menu.entryconfigure(button.firstNum, state=Tkinter.DISABLED)
+            menu.entryconfigure(button.firstNum, state=TKNTR.DISABLED)
         # Last
         if page < len(self.history)-1:
-            menu.entryconfigure(button.lastNum, state=Tkinter.NORMAL)
+            menu.entryconfigure(button.lastNum, state=TKNTR.NORMAL)
         else:
-            menu.entryconfigure(button.lastNum, state=Tkinter.DISABLED)
+            menu.entryconfigure(button.lastNum, state=TKNTR.DISABLED)
         # Delete everything past the separator
         menu.delete(str(button.sepNum),'10000')
         menu.add_separator()
@@ -580,9 +579,9 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
     def makeWindowMenu(self, menubar):
 
-        button = Tkinter.Menubutton(menubar, text='Window')
-        button.pack(side=Tkinter.LEFT, padx=2)
-        button.menu = Tkinter.Menu(button, tearoff=0,
+        button = TKNTR.Menubutton(menubar, text='Window')
+        button.pack(side=TKNTR.LEFT, padx=2)
+        button.menu = TKNTR.Menu(button, tearoff=0,
                 postcommand=self.windowMenuInit)
         button.menu.add_command(label="New...", command=self.createNewWindow)
         # need to add separator here because menu.delete always
@@ -616,9 +615,9 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
     def makeHelpMenu(self, menubar):
 
-        button = Tkinter.Menubutton(menubar, text='Help')
-        button.pack(side=Tkinter.RIGHT, padx=2)
-        button.menu = Tkinter.Menu(button, tearoff=0)
+        button = TKNTR.Menubutton(menubar, text='Help')
+        button.pack(side=TKNTR.RIGHT, padx=2)
+        button.menu = TKNTR.Menu(button, tearoff=0)
         button.menu.add_command(label="Help...", command=self.getHelp)
         button["menu"] = button.menu
         return button
@@ -627,35 +626,35 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
         """Display window with help on graphics"""
 
-        hb = Tkinter.Toplevel(self.top, visual='best')
+        hb = TKNTR.Toplevel(self.top, visual='best')
         hb.title("PyRAF Graphics Help")
         hb.iconname("PyRAF Graphics Help")
 
         # Set up the Menu Bar with 'Close' button
-        hb.menubar = Tkinter.Frame(hb, relief=Tkinter.RIDGE, borderwidth=0)
-        hb.menubar.button = Tkinter.Button(hb.menubar, text="Close",
-                                     relief=Tkinter.RAISED,
+        hb.menubar = TKNTR.Frame(hb, relief=TKNTR.RIDGE, borderwidth=0)
+        hb.menubar.button = TKNTR.Button(hb.menubar, text="Close",
+                                     relief=TKNTR.RAISED,
                                      command=hb.destroy)
         hb.menubar.button.pack()
-        hb.menubar.pack(side=Tkinter.BOTTOM, padx=5, pady=5)
+        hb.menubar.pack(side=TKNTR.BOTTOM, padx=5, pady=5)
 
         # Define the Listbox and setup the Scrollbar
-        hb.list = Tkinter.Listbox(hb,
-                                                        relief = Tkinter.FLAT,
-                                                        height = 25,
-                                                        width = 80,
-                                                        selectmode = Tkinter.SINGLE,
-                                                        selectborderwidth = 0)
-
-        scroll = Tkinter.Scrollbar(hb, command=hb.list.yview)
+        hb.list = TKNTR.Listbox(hb,
+                                relief = TKNTR.FLAT,
+                                height = 25,
+                                width = 80,
+                                selectmode = TKNTR.SINGLE,
+                                selectborderwidth = 0)
+
+        scroll = TKNTR.Scrollbar(hb, command=hb.list.yview)
         hb.list.configure(yscrollcommand=scroll.set)
-        hb.list.pack(side=Tkinter.LEFT, fill=Tkinter.BOTH, expand=1)
-        scroll.pack(side=Tkinter.RIGHT, fill=Tkinter.Y)
+        hb.list.pack(side=TKNTR.LEFT, fill=TKNTR.BOTH, expand=1)
+        scroll.pack(side=TKNTR.RIGHT, fill=TKNTR.Y)
 
         # Insert each line of the helpString into the box
         listing = helpString.split('\n')
         for line in listing:
-            hb.list.insert(Tkinter.END, line)
+            hb.list.insert(TKNTR.END, line)
 
     # -----------------------------------------------
     # start general functionality (independent of graphics panel
@@ -685,7 +684,7 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
         try:
             if self.gwidget:
                 self.gwidget.update_idletasks()
-        except Tkinter.TclError:
+        except TKNTR.TclError:
             pass
 
     def hasFocus(self):
@@ -854,7 +853,7 @@ class GkiInteractiveTkBase(gki.GkiKernel, wutil.FocusEntity):
 
     def raiseWindow(self):
 
-        if self.top.state() != Tkinter.NORMAL:
+        if self.top.state() != TKNTR.NORMAL:
             self.top.deiconify()
         if self._slowraise == 0:
             # Get start time for tkraise...
diff --git a/lib/pyraf/gkitkplot.py b/lib/pyraf/gkitkplot.py
index 5e0e4b4..1dd07d7 100644
--- a/lib/pyraf/gkitkplot.py
+++ b/lib/pyraf/gkitkplot.py
@@ -7,7 +7,7 @@ $Id$
 from __future__ import division # confidence high
 
 import numpy, sys, string
-import Tkinter
+import Tkinter as TKNTR # requires 2to3
 from stsci.tools.for2to3 import ndarr2str
 import wutil, Ptkplot
 import gki, gkitkbase, gkigcur, tkplottext, textattrib, irafgwcs
@@ -154,7 +154,7 @@ class GkiTkplotKernel(gkitkbase.GkiInteractiveTkBase):
         self.clear()
         # This is needed to clear all the previously plotted objects
         # within tkinter (it has its own buffer it uses to replot)
-        #self.gwidget.delete(Tkinter.ALL)
+        #self.gwidget.delete(TKNTR.ALL)
 
     def gki_cancel(self, arg):
 
@@ -276,7 +276,7 @@ class GkiTkplotKernel(gkitkbase.GkiInteractiveTkBase):
         # finally ready to do the drawing
         self.activate()
         # Have Tk remove all previously plotted objects
-        self.gwidget.delete(Tkinter.ALL)
+        self.gwidget.delete(TKNTR.ALL)
         # Clear the screen
         self.tkplot_faset(0,0)
         self.tkplot_fillarea(numpy.array([0.,0.,1.,0.,1.,1.,0.,1.]))
@@ -438,7 +438,7 @@ class tkColorManager:
 
     def setDrawingColor(self, irafColorIndex):
 
-        """Return the specified iraf color usable by Tkinter"""
+        """Return the specified iraf color usable by TKNTR"""
         color = self.config.defaultColors[irafColorIndex]
         red = int(255*color[0])
         green = int(255*color[1])
diff --git a/lib/pyraf/gwm.py b/lib/pyraf/gwm.py
index 5e30f34..5ef1a25 100644
--- a/lib/pyraf/gwm.py
+++ b/lib/pyraf/gwm.py
@@ -9,7 +9,7 @@ from __future__ import division # confidence high
 import os, string
 from stsci.tools import capable
 if capable.OF_GRAPHICS:
-    import Tkinter
+    import Tkinter as TKNTR # requires 2to3
 import wutil, gki
 
 class GWMError(Exception):
@@ -66,7 +66,7 @@ class GraphicsWindowManager(gki.GkiProxy):
             self.createList.append(windowName)
         if self.windowVar is None:
             # create Tk string variable with active window name
-            self.windowVar = Tkinter.StringVar()
+            self.windowVar = TKNTR.StringVar()
             self.windowVar.trace('w', self._setWindowVar)
         self.windowVar.set(windowName)
 
diff --git a/lib/pyraf/irafdisplay.py b/lib/pyraf/irafdisplay.py
index 3abc233..21fec80 100644
--- a/lib/pyraf/irafdisplay.py
+++ b/lib/pyraf/irafdisplay.py
@@ -189,7 +189,7 @@ class ImageDisplay:
     def _read(self, n):
         """Read n bytes from image display and return as string
 
-        Raises IOError on failure.  If a Tkinter widget exists, runs
+        Raises IOError on failure.  If a tkinter widget exists, runs
         a Tk mainloop while waiting for data so that the Tk widgets
         remain responsive.
         """
diff --git a/lib/pyraf/irafukey.py b/lib/pyraf/irafukey.py
index 69eb390..40c68a2 100644
--- a/lib/pyraf/irafukey.py
+++ b/lib/pyraf/irafukey.py
@@ -47,7 +47,7 @@ def getSingleTTYChar(): # return type str in all Python versions
             c = irafutils.tkread(fd, 1)
         else:
             c = os.read(fd, 1)
-            if for2to3.PY3K: c = c.decode('ascii')
+            if for2to3.PY3K: c = c.decode('ascii', 'replace')
     finally:
         termios.tcsetattr(fd, TERMIOS.TCSAFLUSH, old)
         return c
diff --git a/lib/pyraf/msgiobuffer.py b/lib/pyraf/msgiobuffer.py
index 0d5750a..172c108 100644
--- a/lib/pyraf/msgiobuffer.py
+++ b/lib/pyraf/msgiobuffer.py
@@ -9,7 +9,7 @@ $Id$
 from __future__ import division # confidence high
 
 # System level modules
-from Tkinter import *
+from Tkinter import * # requires 2to3
 import string
 
 class MsgIOBuffer(Frame):
diff --git a/lib/pyraf/msgiowidget.py b/lib/pyraf/msgiowidget.py
index 04b3b06..a11e91d 100644
--- a/lib/pyraf/msgiowidget.py
+++ b/lib/pyraf/msgiowidget.py
@@ -8,10 +8,10 @@ from __future__ import division # confidence high
 
 # System level modules
 import sys
-import Tkinter as Tki
+import Tkinter as TKNTR # requires 2to3
 
 # Our modules
-from stsci.tools import tkrotext
+from stsci.tools import irafutils, tkrotext
 
 
 def is_USING_X():
@@ -23,7 +23,7 @@ def is_USING_X():
     return wutil.WUTIL_USING_X
 
 
-class MsgIOWidget(Tki.Frame):
+class MsgIOWidget(TKNTR.Frame):
 
     """MsgIOWidget class"""
 
@@ -31,14 +31,14 @@ class MsgIOWidget(Tki.Frame):
         """Constructor"""
 
         # We are the main frame that holds everything we do
-        Tki.Frame.__init__(self, parent)
+        TKNTR.Frame.__init__(self, parent)
         self._parent = parent
 
         # Create two sub-frames, one to hold the 1-liner msg I/O, and
         # the other one to hold the whole scrollable history.
-        self._nowFrame = Tki.Frame(self, bd=2, relief=Tki.SUNKEN,
+        self._nowFrame = TKNTR.Frame(self, bd=2, relief=TKNTR.SUNKEN,
                                    takefocus=False)
-        self._histFrame = Tki.Frame(self, bd=2, relief=Tki.SUNKEN,
+        self._histFrame = TKNTR.Frame(self, bd=2, relief=TKNTR.SUNKEN,
                                    takefocus=False)
 
         # Put in the expand/collapse button (determine it's sizes)
@@ -50,64 +50,64 @@ class MsgIOWidget(Tki.Frame):
         else: # Aqua
             px = 5
             py = 3
-            if Tki.TkVersion > 8.4:
+            if TKNTR.TkVersion > 8.4:
                 px = py = 0
                 btxt = ''
                 self._expBttnHasTxt = False
-        self._expBttn = Tki.Checkbutton(self._nowFrame, command=self._expand,
+        self._expBttn = TKNTR.Checkbutton(self._nowFrame, command=self._expand,
                                         padx=px, pady=py,
                                         text=btxt, indicatoron=0,
-                                        state = Tki.DISABLED)
-        self._expBttn.pack(side=Tki.LEFT, padx=3)#, ipadx=0)
+                                        state = TKNTR.DISABLED)
+        self._expBttn.pack(side=TKNTR.LEFT, padx=3)#, ipadx=0)
 
         # Overlay a label on the frame
-        self._msgLabelVar = Tki.StringVar()
+        self._msgLabelVar = TKNTR.StringVar()
         self._msgLabelVar.set(text)
         self._msgLabelMaxWidth = 65 # 70 works but causes plot redraws when
                                     # the history panel is opened/closed
-        self._msgLabel = Tki.Label(self._nowFrame,
+        self._msgLabel = TKNTR.Label(self._nowFrame,
                                    textvariable=self._msgLabelVar,
-                                   anchor=Tki.W,
-                                   justify=Tki.LEFT,
+                                   anchor=TKNTR.W,
+                                   justify=TKNTR.LEFT,
                                    width=self._msgLabelMaxWidth,
                                    wraplength=width-100,
                                    takefocus=False)
-        self._msgLabel.pack(side=Tki.LEFT,
-                            fill=Tki.X,
+        self._msgLabel.pack(side=TKNTR.LEFT,
+                            fill=TKNTR.X,
                             expand=False)
         self._msgLabel.bind('<Double-Button-1>', self._lblDblClk)
 
-        self._entry = Tki.Entry(self._nowFrame,
-                                state=Tki.DISABLED,
+        self._entry = TKNTR.Entry(self._nowFrame,
+                                state=TKNTR.DISABLED,
                                 width=1,
                                 takefocus=False,
-                                relief=Tki.FLAT,
+                                relief=TKNTR.FLAT,
                                 highlightthickness=0)
-        self._entry.pack(side=Tki.LEFT, fill=Tki.X, expand=True)
+        self._entry.pack(side=TKNTR.LEFT, fill=TKNTR.X, expand=True)
         self._entry.bind('<Return>', self._enteredText)
-        self._entryTyping = Tki.BooleanVar()
+        self._entryTyping = TKNTR.BooleanVar()
         self._entryTyping.set(False)
 
         # put in a spacer here for label height stability
-        self._spacer = Tki.Label(self._nowFrame, text='', takefocus=False)
-        self._spacer.pack(side=Tki.LEFT, expand=False, padx=5)
+        self._spacer = TKNTR.Label(self._nowFrame, text='', takefocus=False)
+        self._spacer.pack(side=TKNTR.LEFT, expand=False, padx=5)
 
-        self._nowFrame.pack(side=Tki.TOP, fill=Tki.X, expand=True)
+        self._nowFrame.pack(side=TKNTR.TOP, fill=TKNTR.X, expand=True)
 
         self._hasHistory = False
-        self._histScrl = Tki.Scrollbar(self._histFrame)
-        self._histScrl.pack(side=Tki.RIGHT, fill=Tki.Y)
+        self._histScrl = TKNTR.Scrollbar(self._histFrame)
+        self._histScrl.pack(side=TKNTR.RIGHT, fill=TKNTR.Y)
 
-        self._histText = tkrotext.ROText(self._histFrame, wrap=Tki.WORD,
+        self._histText = tkrotext.ROText(self._histFrame, wrap=TKNTR.WORD,
                          takefocus=False,
                          height=10, yscrollcommand=self._histScrl.set)
-# (use if just Tki.Text) state=Tki.DISABLED, takefocus=False,
+# (use if just TKNTR.Text) state=TKNTR.DISABLED, takefocus=False,
 #                        exportselection=True is the default
-        self._histText.pack(side=Tki.TOP, fill=Tki.X, expand=True)
+        self._histText.pack(side=TKNTR.TOP, fill=TKNTR.X, expand=True)
         self._histScrl.config(command=self._histText.yview)
 
         # don't pack this one now - start out with it hidden
-#       self._histFrame.pack(side=Tki.TOP, fill=Tki.X)
+#       self._histFrame.pack(side=TKNTR.TOP, fill=TKNTR.X)
 
         ### Do not pack the main frame here.  Let the application do it. ###
 
@@ -130,11 +130,11 @@ class MsgIOWidget(Tki.Frame):
             if self._expBttnHasTxt:
                 self._expBttn.configure(text='+')
         else:   # need to expand
-            self._histFrame.pack(side=Tki.TOP, fill=Tki.BOTH, expand=True) #.X)
+            self._histFrame.pack(side=TKNTR.TOP, fill=TKNTR.BOTH, expand=True) #.X)
             if self._expBttnHasTxt:
                 self._expBttn.configure(text='-')
             if self._hasHistory:
-                self._histText.see(Tki.END)
+                self._histText.see(TKNTR.END)
 
 
     def updateIO(self, text=""):
@@ -162,7 +162,7 @@ class MsgIOWidget(Tki.Frame):
         self._msgLabel.configure(width=min(self._msgLabelMaxWidth, lblTxtLen))
 
         # Enable the entry widget
-        self._entry.configure(state=Tki.NORMAL, relief=Tki.SUNKEN, width=15,
+        self._entry.configure(state=TKNTR.NORMAL, relief=TKNTR.SUNKEN, width=15,
                               takefocus=True, highlightthickness=2)
         self._entry.focus_set()
         self._entryTyping.set(True)
@@ -174,9 +174,9 @@ class MsgIOWidget(Tki.Frame):
         ans = self._entry.get().strip()
 
         # Clear and disable the entry widget
-        self._entry.delete(0, Tki.END)
-        self._entry.configure(state=Tki.DISABLED, takefocus=False, width=1,
-                              relief=Tki.FLAT, highlightthickness=0)
+        self._entry.delete(0, TKNTR.END)
+        self._entry.configure(state=TKNTR.DISABLED, takefocus=False, width=1,
+                              relief=TKNTR.FLAT, highlightthickness=0)
         self._entryTyping.set(False)
 
         # Expand the label back to normal width
@@ -204,26 +204,26 @@ class MsgIOWidget(Tki.Frame):
             return
 
         # enable widget temporarily so we can add text
-#       self._histText.config(state=Tki.NORMAL)
+#       self._histText.config(state=TKNTR.NORMAL)
 #       self._histText.delete(1.0, END)
 
         # add the new text
         if self._hasHistory:
-            self._histText.insert(Tki.END, '\n'+txt.strip(), force=True)
+            self._histText.insert(TKNTR.END, '\n'+txt.strip(), force=True)
         else:
-            self._histText.insert(Tki.END, txt.strip(), force=True)
+            self._histText.insert(TKNTR.END, txt.strip(), force=True)
             self._hasHistory = True
 
         # disable it again
-#       self._histText.config(state=Tki.DISABLED)
+#       self._histText.config(state=TKNTR.DISABLED)
 
         # show it
         if self._histFrame.winfo_ismapped():
-            self._histText.see(Tki.END)
+            self._histText.see(TKNTR.END)
 #       self._histFrame.update_idletasks()
 
         # finally, make sure expand/collapse button is enabled now
-        self._expBttn.configure(state = Tki.NORMAL)
+        self._expBttn.configure(state = TKNTR.NORMAL)
 
 
 # Test the above class
@@ -244,26 +244,22 @@ if __name__ == '__main__':
         out = m.readline()
 
     # create the initial Tk window and immediately withdraw it
-    if not Tki._default_root:
-        _default_root = Tki.Tk()
-    else:
-        _default_root = Tki._default_root
-    _default_root.withdraw()
+    irafutils.init_tk_default_root()
 
     # make our test window
-    top = Tki.Toplevel()
-    f = Tki.Frame(top, width=500, height=300)
-    b = Tki.Button(f, text='Click Me', command=clicked)
-    b.pack(side=Tki.LEFT, fill=Tki.X, expand=1)
-    q = Tki.Button(f, text='Buh-Bye', command=quit)
-    q.pack(side=Tki.LEFT)
-    f.pack(side=Tki.TOP, fill=Tki.X) # , expand=1)
-    p = Tki.Button(top, text='Prompt Me', command=ask)
-    p.pack(side=Tki.TOP, fill=Tki.X, expand=1)
-    fill = Tki.Frame(top, height=200, bg="green")
-    fill.pack(side=Tki.TOP, fill=Tki.BOTH, expand=1)
+    top = TKNTR.Toplevel()
+    f = TKNTR.Frame(top, width=500, height=300)
+    b = TKNTR.Button(f, text='Click Me', command=clicked)
+    b.pack(side=TKNTR.LEFT, fill=TKNTR.X, expand=1)
+    q = TKNTR.Button(f, text='Buh-Bye', command=quit)
+    q.pack(side=TKNTR.LEFT)
+    f.pack(side=TKNTR.TOP, fill=TKNTR.X) # , expand=1)
+    p = TKNTR.Button(top, text='Prompt Me', command=ask)
+    p.pack(side=TKNTR.TOP, fill=TKNTR.X, expand=1)
+    fill = TKNTR.Frame(top, height=200, bg="green")
+    fill.pack(side=TKNTR.TOP, fill=TKNTR.BOTH, expand=1)
     m = MsgIOWidget(top, 500, "Tiptop")
-    m.pack(side=Tki.BOTTOM, fill=Tki.X)
+    m.pack(side=TKNTR.BOTTOM, fill=TKNTR.X)
     for i in range(10):
         t = "Text " + str(i)
         m.updateIO(t)
diff --git a/lib/pyraf/newWindowHack.py b/lib/pyraf/newWindowHack.py
index 3a2e8e1..d56cc01 100644
--- a/lib/pyraf/newWindowHack.py
+++ b/lib/pyraf/newWindowHack.py
@@ -7,11 +7,9 @@ code:  the dialog is created,  but it is withdrawn just like the
 root window (!) so there is nothing to interact with and the system
 hangs.
 
-import Tkinter
-
-tk = Tkinter.Tk()
+import Tkinter as TKNTR
+tk = TKNTR.Tk()
 tk.withdraw()
-
 import tkSimpleDialog
 tkSimpleDialog.askstring("window title", "question?")
 
@@ -20,7 +18,7 @@ $Id$
 from __future__ import division # confidence high
 
 import tkSimpleDialog
-from Tkinter import *
+from Tkinter import * # requires 2to3
 
 def __init__(self, parent, title = None):
     '''Initialize a dialog.
@@ -76,11 +74,11 @@ Here are some more notes from my "investigation":
 
 http://mail.python.org/pipermail/python-list/2005-April/275761.html
 
-Tkinter "withdraw" and "askstring" problem
+tkinter "withdraw" and "askstring" problem
 Jeff Epler jepler at unpythonic.net
 Tue Apr 12 15:58:22 CEST 2005
 
-    * Previous message: Tkinter "withdraw" and "askstring" problem
+    * Previous message: tkinter "withdraw" and "askstring" problem
     * Next message: os.open() i flaga lock
     * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
 
diff --git a/lib/pyraf/pyrafTk.py b/lib/pyraf/pyrafTk.py
index 49a4bc5..e9709d5 100644
--- a/lib/pyraf/pyrafTk.py
+++ b/lib/pyraf/pyrafTk.py
@@ -1,4 +1,4 @@
-"""pyrafTk.py: modify Tkinter root to print short PyRAF tracebacks
+"""pyrafTk.py: modify tkinter root to print short PyRAF tracebacks
 
 $Id$
 
@@ -6,19 +6,20 @@ R. L. White, 2000 November 17
 """
 from __future__ import division # confidence high
 
-import sys, Tkinter
+import sys
+import Tkinter as TKNTR # requires 2to3
 import wutil
 
-class _PyrafTk(Tkinter.Tk):
+class _PyrafTk(TKNTR.Tk):
 
     """Modified Tk class that prints short pyraf tracebacks"""
 
     def __init__(self, function):
         self._pyraf_showtraceback = function
-        Tkinter.Tk.__init__(self)
+        TKNTR.Tk.__init__(self)
 
     def report_callback_exception(self, exc, val, tb):
-        sys.stderr.write("Exception in Tkinter callback\n")
+        sys.stderr.write("Exception in tkinter callback\n")
         sys.last_type = exc
         sys.last_value = val
         sys.last_traceback = tb
@@ -30,9 +31,9 @@ def setTkErrorHandler(function):
     If Tk root already exists, this function has no effect.
     """
 
-    if Tkinter._default_root is None and wutil.hasGraphics:
+    if TKNTR._default_root is None and wutil.hasGraphics:
         try:
             root = _PyrafTk(function)
             root.withdraw()
-        except Tkinter.TclError:
+        except TKNTR.TclError:
             pass
diff --git a/lib/pyraf/splash.py b/lib/pyraf/splash.py
index 2a12316..deadbaa 100644
--- a/lib/pyraf/splash.py
+++ b/lib/pyraf/splash.py
@@ -7,13 +7,14 @@ R. White, 2001 Dec 15
 
 from __future__ import division # confidence high
 
-import os, sys, Tkinter
+import os, sys
+import Tkinter as TKNTR # requires 2to3
 from stsci.tools.irafglobals import IrafPkg
 import wutil
 
 logo = "pyraflogo_rgb_web.gif"
 
-class SplashScreen(Tkinter.Toplevel):
+class SplashScreen(TKNTR.Toplevel):
 
     """Base class for splash screen
 
@@ -26,8 +27,8 @@ class SplashScreen(Tkinter.Toplevel):
     Based closely on news posting by Alexander Schliep, 07 Apr 1999
     """
 
-    def __init__(self, master=None, borderwidth=4, relief=Tkinter.RAISED, **kw):
-        Tkinter.Toplevel.__init__(self, master, relief=relief,
+    def __init__(self, master=None, borderwidth=4, relief=TKNTR.RAISED, **kw):
+        TKNTR.Toplevel.__init__(self, master, relief=relief,
             borderwidth=borderwidth, **kw)
         if self.master.master != None: # Why?
             self.master.master.withdraw()
@@ -96,11 +97,11 @@ class PyrafSplash(SplashScreen):
 
     def createWidgets(self):
         """Create pyraf splash image"""
-        self.img = Tkinter.PhotoImage(file=self.filename)
+        self.img = TKNTR.PhotoImage(file=self.filename)
         width = self.img.width()+20
         iheight = self.img.height()
         height = iheight+10+15*self.nlines
-        self.canvas = Tkinter.Canvas(self, width=width, height=height,
+        self.canvas = TKNTR.Canvas(self, width=width, height=height,
             background=self["background"])
         self.image = self.canvas.create_image(width//2, 5+iheight//2, image=self.img)
         self.text = self.nlines*[None]
@@ -141,7 +142,7 @@ class PyrafSplash(SplashScreen):
     def Destroy(self, event=None):
         if event:
             # make sure button release occurred in window
-            # Tkinter should take care of this but doesn't
+            # tkinter should take care of this but doesn't
             if event.x<0 or event.x>=self.winfo_width() or \
                event.y<0 or event.y>=self.winfo_height():
                 self['cursor'] = self.defaultCursor
@@ -202,12 +203,12 @@ class IrafMonitorSplash(PyrafSplash):
 def splash(label="PyRAF Execution Monitor", background="LightYellow", **kw):
     """Display the PyRAF splash screen
 
-    Silently does nothing if Tkinter is not usable.
+    Silently does nothing if tkinter is not usable.
     """
     if wutil.hasGraphics:
         try:
             return IrafMonitorSplash(label, background=background, **kw)
-        except Tkinter.TclError:
+        except TKNTR.TclError:
             pass
     return None
 
diff --git a/lib/pyraf/subproc.py b/lib/pyraf/subproc.py
index 92a27f4..4afac74 100644
--- a/lib/pyraf/subproc.py
+++ b/lib/pyraf/subproc.py
@@ -863,7 +863,7 @@ class RedirProcess(Subprocess):
 def test(fout = sys.stdout):
     fout.write("Starting test ...\n")
     assert hasattr(fout, 'write'), "Input not a file object: "+str(fout)
-    print "\tOpening subprocess (git 22 jul):"
+    print "\tOpening subprocess (4 Jan 2017):"
     p = Subprocess('cat', expire_noisily=1)        # set to expire noisily...
     print p
     print "\tOpening bogus subprocess, should fail:"
diff --git a/lib/pyraf/version.py b/lib/pyraf/version.py
index 5984b74..e9bf01e 100644
--- a/lib/pyraf/version.py
+++ b/lib/pyraf/version.py
@@ -7,11 +7,11 @@ __all__ = ['__version__', '__vdate__', '__svn_revision__', '__svn_full_info__',
 
 import datetime
 
-__version__ = '2.1.11'
+__version__ = '2.1.14'
 __vdate__ = 'unspecified'
 __svn_revision__ = 'exported'
 __svn_full_info__ = 'unknown'
-__setup_datetime__ = datetime.datetime(2016, 7, 22, 15, 19, 17, 846349)
+__setup_datetime__ = datetime.datetime(2017, 1, 5, 14, 18, 17, 617135)
 
 # what version of stsci.distutils created this version.py
 stsci_distutils_version = '0.3.8.dev'
diff --git a/lib/pyraf/version_vcs.py b/lib/pyraf/version_vcs.py
index 5d2bfb2..0cc6e15 100644
--- a/lib/pyraf/version_vcs.py
+++ b/lib/pyraf/version_vcs.py
@@ -1,2 +1,2 @@
 "This is automatically generated at package time.  Do not edit"
-__vcs_revision__ = '837a8509'
+__vcs_revision__ = '06c482ad'
diff --git a/lib/pyraf/wutil.py b/lib/pyraf/wutil.py
index b929b44..1988ade 100644
--- a/lib/pyraf/wutil.py
+++ b/lib/pyraf/wutil.py
@@ -1,5 +1,5 @@
 """Contains python routines to do special Window manipulations not
-possible in Tkinter.
+possible in tkinter.
 These are python stubs that are overloaded by a c version implementations.
 If the c versions do not exist, then these routines will do nothing
 
@@ -525,12 +525,12 @@ def dumpspecs(outstream = None, skip_volatiles = False):
 
     if not capable.OF_GRAPHICS:
         if hasattr(capable, 'TKINTER_IMPORT_FAILED'):
-            out += "\nTkinter import failed."
+            out += "\ntkinter import failed."
         else:
-            out += "\nTkinter use unattempted."
+            out += "\ntkinter use unattempted."
     else:
-        out += "\nTclVersion = "+str(capable.Tkinter.TclVersion)
-        out += "\nTkVersion = "+str(capable.Tkinter.TkVersion)
+        out += "\nTclVersion = "+str(capable.TKNTR.TclVersion)
+        out += "\nTkVersion = "+str(capable.TKNTR.TkVersion)
         out += "\nWUTIL_ON_MAC = "+str(WUTIL_ON_MAC)
         out += "\nWUTIL_ON_WIN = "+str(WUTIL_ON_WIN)
         out += "\nWUTIL_USING_X = "+str(WUTIL_USING_X)
@@ -601,7 +601,7 @@ if _skipDisplay:
         else:
             print "No graphics/display possible for this session."
             if hasattr(capable, 'TKINTER_IMPORT_FAILED'):
-                print "Tkinter import failed."
+                print "tkinter import failed."
 else:
     if _has_xutil or _has_aqutil:
         hasGraphics = focusController.hasGraphics
diff --git a/lib/pyraf_setup.pyc b/lib/pyraf_setup.pyc
index b4f9b65..c1948f1 100644
Binary files a/lib/pyraf_setup.pyc and b/lib/pyraf_setup.pyc differ
diff --git a/required_pkgs/stsci.tools b/required_pkgs/stsci.tools
index a2f7f46..93d03d1 160000
--- a/required_pkgs/stsci.tools
+++ b/required_pkgs/stsci.tools
@@ -1 +1 @@
-Subproject commit a2f7f4618e3975a857c8c65a6fa1d49d8c66d482
+Subproject commit 93d03d19735358dbba1543c168ebe6ff5eb8a32e
diff --git a/setup.cfg b/setup.cfg
index d59bb2c..f64df66 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
 [metadata]
 name = pyraf
-version = 2.1.11
+version = 2.1.14
 author = Rick White, Perry Greenfield, Chris Sontag
 author-email = help at stsci.edu
 home-page = http://www.stsci.edu/resources/software_hardware/pyraf

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/python-pyraf.git



More information about the Debian-astro-commits mailing list