Index: src/sas/sasgui/plottools/LineModel.py
===================================================================
--- src/sas/sasgui/plottools/LineModel.py	(revision a26f67f1457e7e39b79d4c3800c03bcaa208dff7)
+++ src/sas/sasgui/plottools/LineModel.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -83,5 +83,5 @@
         elif x.__class__.__name__ == 'tuple':
             msg = "Tuples are not allowed as input to BaseComponent models"
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             return self._line(x)
@@ -105,5 +105,5 @@
         elif x.__class__.__name__ == 'tuple':
             msg = "Tuples are not allowed as input to BaseComponent models"
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             return self._line(x)
Index: src/sas/sasgui/plottools/PlotPanel.py
===================================================================
--- src/sas/sasgui/plottools/PlotPanel.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/PlotPanel.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -2,5 +2,5 @@
     Plot panel.
 """
-from __future__ import print_function
+
 
 import logging
@@ -16,13 +16,13 @@
 from matplotlib.figure import Figure
 import os
-import transform
+from . import transform
 #TODO: make the plottables interactive
-from binder import BindArtist
+from .binder import BindArtist
 from matplotlib.font_manager import FontProperties
 DEBUG = False
 
-from plottables import Graph
-from TextDialog import TextDialog
-from LabelDialog import LabelDialog
+from .plottables import Graph
+from .TextDialog import TextDialog
+from .LabelDialog import LabelDialog
 import operator
 
@@ -44,5 +44,5 @@
         for a in obj.get_children(): show_tree(a, d + 1)
 
-from convert_units import convert_unit
+from .convert_units import convert_unit
 
 
@@ -116,5 +116,5 @@
         self.figure = Figure(None, dpi, linewidth=2.0)
         self.color = '#b3b3b3'
-        from canvas import FigureCanvas
+        from .canvas import FigureCanvas
         self.canvas = FigureCanvas(self, -1, self.figure)
         self.SetColor(color)
@@ -657,8 +657,8 @@
         else:
             plot_dict = plotlist
-        from fitDialog import LinearFit
-
-        if len(plot_dict.keys()) > 0:
-            first_item = plot_dict.keys()[0]
+        from .fitDialog import LinearFit
+
+        if len(list(plot_dict.keys())) > 0:
+            first_item = list(plot_dict.keys())[0]
             dlg = LinearFit(parent=None, plottable=first_item,
                             push_data=self.onFitDisplay,
@@ -691,5 +691,5 @@
             return
         name = menu.GetHelpString(id)
-        for plot in self.plots.values():
+        for plot in list(self.plots.values()):
             if plot.name == name:
                 self.graph.selected_plottable = plot.id
@@ -703,5 +703,5 @@
 
         """
-        from fitDialog import LinearFit
+        from .fitDialog import LinearFit
         if self._fit_dialog is not None:
             return
@@ -733,8 +733,8 @@
             self._fit_dialog = None
         plot_list = self.graph.returnPlottable()
-        if len(plot_list.keys()) > 0:
-            first_item = plot_list.keys()[0]
+        if len(list(plot_list.keys())) > 0:
+            first_item = list(plot_list.keys())[0]
             if first_item.x != []:
-                from PropertyDialog import Properties
+                from .PropertyDialog import Properties
                 dial = Properties(self, -1, 'Properties')
                 dial.setValues(self.prevXtrans, self.prevYtrans, self.viewModel)
@@ -956,5 +956,5 @@
             hl = sorted(zip(handles, labels),
                         key=operator.itemgetter(1))
-            handles2, labels2 = zip(*hl)
+            handles2, labels2 = list(zip(*hl))
             self.line_collections_list = handles2
             self.legend = self.subplot.legend(handles2, labels2,
@@ -986,5 +986,5 @@
         hl = sorted(zip(handles, labels),
                     key=operator.itemgetter(1))
-        handles2, labels2 = zip(*hl)
+        handles2, labels2 = list(zip(*hl))
         self.line_collections_list = handles2
         self.legend = self.subplot.legend(handles2, labels2,
@@ -1247,5 +1247,5 @@
                 hl = sorted(zip(handles, labels),
                             key=operator.itemgetter(1))
-                handles2, labels2 = zip(*hl)
+                handles2, labels2 = list(zip(*hl))
                 self.line_collections_list = handles2
                 self.legend = ax.legend(handles2, labels2,
@@ -1327,5 +1327,5 @@
         if id is None:
             id = name
-        from plottable_interactor import PointInteractor
+        from .plottable_interactor import PointInteractor
         p = PointInteractor(self, self.subplot, zorder=zorder, id=id)
         if p.markersize is not None:
@@ -1344,5 +1344,5 @@
         if id is None:
             id = name
-        from plottable_interactor import PointInteractor
+        from .plottable_interactor import PointInteractor
         p = PointInteractor(self, self.subplot, zorder=zorder, id=id)
         p.curve(x, y, dy=dy, color=color, symbol=symbol, zorder=zorder,
@@ -1754,5 +1754,5 @@
             self.graph.delete(self.fit_result)
             if hasattr(self, 'plots'):
-                if 'fit' in self.plots.keys():
+                if 'fit' in list(self.plots.keys()):
                     del self.plots['fit']
         self.ly = None
Index: src/sas/sasgui/plottools/__init__.py
===================================================================
--- src/sas/sasgui/plottools/__init__.py	(revision efe730d4bba7a05c203957e4495eece8359fcd77)
+++ src/sas/sasgui/plottools/__init__.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -1,2 +1,2 @@
-from PlotPanel import PlotPanel
-from plottables import Data1D, Theory1D
+from .PlotPanel import PlotPanel
+from .plottables import Data1D, Theory1D
Index: src/sas/sasgui/plottools/arrow3d.py
===================================================================
--- src/sas/sasgui/plottools/arrow3d.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/arrow3d.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -59,5 +59,5 @@
             return
         xs3d, ys3d, zs3d = self._verts3d
-        for i in xrange(len(xs3d)):
+        for i in range(len(xs3d)):
             xs, ys, _ = proj3d.proj_transform(xs3d[i], ys3d[i], zs3d[i], renderer.M)
             self.set_positions((xs[0], ys[0]), (xs[1], ys[1]))
Index: src/sas/sasgui/plottools/binder.py
===================================================================
--- src/sas/sasgui/plottools/binder.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/binder.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -2,5 +2,5 @@
 Extension to MPL to support the binding of artists to key/mouse events.
 """
-from __future__ import print_function
+
 
 import sys
@@ -28,5 +28,5 @@
         return self.artist is not other.artist
 
-    def __nonzero__(self):
+    def __bool__(self):
         return self.artist is not None
 
@@ -125,5 +125,5 @@
             for cid in self._connections: self.canvas.mpl_disconnect(cid)
         except:
-            logger.error("Error disconnection canvas: %s" % sys.exc_value)
+            logger.error("Error disconnection canvas: %s" % sys.exc_info()[1])
         self._connections = []
 
@@ -189,6 +189,6 @@
         # Check that the trigger is valid
         if trigger not in self._actions:
-            raise ValueError, "%s invalid --- valid triggers are %s"\
-                 % (trigger, ", ".join(self.events))
+            raise ValueError("%s invalid --- valid triggers are %s"\
+                 % (trigger, ", ".join(self.events)))
 
         # Register the trigger callback
@@ -205,5 +205,5 @@
         """
         if action not in self.events:
-            raise ValueError, "Trigger expects " + ", ".join(self.events)
+            raise ValueError("Trigger expects " + ", ".join(self.events))
 
         # Tag the event with modifiers
Index: src/sas/sasgui/plottools/canvas.py
===================================================================
--- src/sas/sasgui/plottools/canvas.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/canvas.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -98,5 +98,5 @@
             dc.DrawBitmap(self.canvas.bitmap, (0, 0))
         except:
-            logger.error(sys.exc_value)
+            logger.error(sys.exc_info()[1])
 
     # restore original figure  resolution
@@ -209,5 +209,5 @@
                 fig.draw(self)
             except ValueError:
-                logger.error(sys.exc_value)
+                logger.error(sys.exc_info()[1])
         else:
             self._isRendered = False
Index: src/sas/sasgui/plottools/convert_units.py
===================================================================
--- src/sas/sasgui/plottools/convert_units.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/convert_units.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -3,5 +3,5 @@
     This is a cleaned up version of unitConverter.py
 """
-from __future__ import print_function
+
 
 import re
@@ -44,10 +44,10 @@
                             unit = toks[0] + "^{" + str(powerer) + "}"
                 else:
-                    raise ValueError, "missing } in unit expression"
+                    raise ValueError("missing } in unit expression")
         else:  # no powerer
             if  power != 1:
                 unit = "(" + unit + ")" + "^{" + str(power) + "}"
     else:
-        raise ValueError, "empty unit ,enter a powerer different from zero"
+        raise ValueError("empty unit ,enter a powerer different from zero")
     return unit
 
Index: src/sas/sasgui/plottools/fitDialog.py
===================================================================
--- src/sas/sasgui/plottools/fitDialog.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/fitDialog.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -1,8 +1,8 @@
 import wx
-from plottables import Theory1D
+from .plottables import Theory1D
 import math
 import numpy as np
-import fittings
-import transform
+from . import fittings
+from . import transform
 import sys
 
@@ -86,5 +86,5 @@
         self.layout()
         # Receives the type of model for the fitting
-        from LineModel import LineModel
+        from .LineModel import LineModel
         self.model = LineModel()
         # Display the fittings values
@@ -671,5 +671,5 @@
                 return x
             else:
-                raise ValueError, "cannot compute log of a negative number"
+                raise ValueError("cannot compute log of a negative number")
 
     def floatInvTransform(self, x):
@@ -734,5 +734,5 @@
         except:
             msg = "LinearFit.set_fit_region: fit range must be floats"
-            raise ValueError, msg
+            raise ValueError(msg)
         self.xminFit.SetValue(format_number(xmin))
         self.xmaxFit.SetValue(format_number(xmax))
Index: src/sas/sasgui/plottools/fittings.py
===================================================================
--- src/sas/sasgui/plottools/fittings.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/fittings.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -14,5 +14,5 @@
 
 """
-from __future__ import print_function
+
 
 from scipy import optimize
@@ -101,5 +101,5 @@
     # Testing implementation
     # Fit a Line model
-    from LineModel import LineModel
+    from .LineModel import LineModel
     line = LineModel()
     cstA = Parameter(line, 'A', event.cstA)
Index: src/sas/sasgui/plottools/plottable_interactor.py
===================================================================
--- src/sas/sasgui/plottools/plottable_interactor.py	(revision a1b8fee73528559155793dd74cda07d0c32e9d72)
+++ src/sas/sasgui/plottools/plottable_interactor.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -2,7 +2,7 @@
     This module allows more interaction with the plot
 """
-from __future__ import print_function
-
-from BaseInteractor import _BaseInteractor
+
+
+from .BaseInteractor import _BaseInteractor
 
 
Index: src/sas/sasgui/plottools/plottables.py
===================================================================
--- src/sas/sasgui/plottools/plottables.py	(revision 2d9526dfda3bdfe3c9159ab7d9db8399b4a00848)
+++ src/sas/sasgui/plottools/plottables.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -242,5 +242,5 @@
         selected_color = plottable.custom_color
         selected_plottable = None
-        for p in self.plottables.keys():
+        for p in list(self.plottables.keys()):
             if plottable.id == p.id:
                 selected_plottable = p
@@ -389,5 +389,5 @@
 
         """
-        raise NotImplemented, "Not a valid transform"
+        raise NotImplemented("Not a valid transform")
 
     # Related issues
@@ -517,5 +517,5 @@
                 label_dict[collection[0]] = basename
             else:
-                for i in xrange(len(collection)):
+                for i in range(len(collection)):
                     label_dict[collection[i]] = "%s %d" % (basename, i)
         return label_dict
@@ -689,15 +689,15 @@
                 msg = "Plottable.View: Given x and dx are not"
                 msg += " of the same length"
-                raise ValueError, msg
+                raise ValueError(msg)
             # Check length of y array
             if not len(y) == len(x):
                 msg = "Plottable.View: Given y "
                 msg += "and x are not of the same length"
-                raise ValueError, msg
+                raise ValueError(msg)
 
             if dy is not None and not len(dy) == 0 and not len(y) == len(dy):
                 msg = "Plottable.View: Given y and dy are not of the same "
                 msg += "length: len(y)=%s, len(dy)=%s" % (len(y), len(dy))
-                raise ValueError, msg
+                raise ValueError(msg)
             self.x = []
             self.y = []
@@ -734,13 +734,13 @@
                 msg = "Plottable.View: transformed x "
                 msg += "and y are not of the same length"
-                raise ValueError, msg
+                raise ValueError(msg)
             if has_err_x and not (len(self.x) == len(self.dx)):
                 msg = "Plottable.View: transformed x and dx"
                 msg += " are not of the same length"
-                raise ValueError, msg
+                raise ValueError(msg)
             if has_err_y and not (len(self.y) == len(self.dy)):
                 msg = "Plottable.View: transformed y"
                 msg += " and dy are not of the same length"
-                raise ValueError, msg
+                raise ValueError(msg)
             # Check that negative values are not plot on x and y axis for
             # log10 transformation
@@ -814,5 +814,5 @@
                 except:
                     logger.error("check_data_logX: skipping point x %g", self.x[i])
-                    logger.error(sys.exc_value)
+                    logger.error(sys.exc_info()[1])
             self.x = tempx
             self.y = tempy
@@ -844,5 +844,5 @@
                 except:
                     logger.error("check_data_logY: skipping point %g", self.y[i])
-                    logger.error(sys.exc_value)
+                    logger.error(sys.exc_info()[1])
 
             self.x = tempx
@@ -1108,5 +1108,5 @@
         Plottable.__init__(self)
         msg = "Theory1D is no longer supported, please use Data1D and change symbol.\n"
-        raise DeprecationWarning, msg
+        raise DeprecationWarning(msg)
 
 class Fit1D(Plottable):
Index: src/sas/sasgui/plottools/transform.py
===================================================================
--- src/sas/sasgui/plottools/transform.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/plottools/transform.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -24,5 +24,5 @@
     """
     if not x > 0:
-        raise ValueError, "Transformation only accepts positive values."
+        raise ValueError("Transformation only accepts positive values.")
     else:
         return x
@@ -50,5 +50,5 @@
     """
     if not x >= 0:
-        raise ValueError, "square root of a negative value "
+        raise ValueError("square root of a negative value ")
     else:
         return math.sqrt(x)
@@ -76,5 +76,5 @@
     """
     if not x >= 0:
-        raise ValueError, "double square root of a negative value "
+        raise ValueError("double square root of a negative value ")
     else:
         return math.sqrt(math.sqrt(x))
@@ -90,5 +90,5 @@
     """
     if not x > 0:
-        raise ValueError, "Log(x)of a negative value "
+        raise ValueError("Log(x)of a negative value ")
     else:
         return math.log(x)
@@ -100,5 +100,5 @@
         return 1 / x
     else:
-        raise ValueError, "cannot divide by zero"
+        raise ValueError("cannot divide by zero")
 
 
@@ -109,5 +109,5 @@
         return 1 / math.sqrt(y)
     else:
-        raise ValueError, "transform.toOneOverSqrtX: cannot be computed"
+        raise ValueError("transform.toOneOverSqrtX: cannot be computed")
 
 
@@ -118,5 +118,5 @@
         return math.log(y * (x ** 2))
     else:
-        raise ValueError, "transform.toLogYX2: cannot be computed"
+        raise ValueError("transform.toLogYX2: cannot be computed")
 
 
@@ -127,5 +127,5 @@
         return math.log(math.pow(x, 4) * y)
     else:
-        raise ValueError, "transform.toLogYX4: input error"
+        raise ValueError("transform.toLogYX4: input error")
 
 
@@ -149,5 +149,5 @@
     """
     if not (x * y) > 0:
-        raise ValueError, "Log(X*Y)of a negative value "
+        raise ValueError("Log(X*Y)of a negative value ")
     else:
         return math.log(x * y)
@@ -211,5 +211,5 @@
     else:
         msg = "transform.errFromX2: can't compute error of negative x"
-        raise ValueError, msg
+        raise ValueError(msg)
 
 
@@ -245,5 +245,5 @@
     else:
         msg = "transform.errFromX4: can't compute error of negative x"
-        raise ValueError, msg
+        raise ValueError(msg)
 
 
@@ -264,9 +264,9 @@
         msg = "Transformation does not accept"
         msg += " point that are consistent with zero."
-        raise ValueError, msg
+        raise ValueError(msg)
     if x != 0:
         dx = dx / (x * math.log(10))
     else:
-        raise ValueError, "errToLogX: divide by zero"
+        raise ValueError("errToLogX: divide by zero")
     return dx
 
@@ -287,5 +287,5 @@
         dx = dx / x
     else:
-        raise ValueError, "errToLogX: divide by zero"
+        raise ValueError("errToLogX: divide by zero")
     return dx
 
@@ -312,5 +312,5 @@
         msg = "Transformation does not accept point "
         msg += " that are consistent with zero."
-        raise ValueError, msg
+        raise ValueError(msg)
     if x != 0 and y != 0:
         if dx is None:
@@ -320,5 +320,5 @@
         err = (dx / x) ** 2 + (dy / y) ** 2
     else:
-        raise ValueError, "cannot compute this error"
+        raise ValueError("cannot compute this error")
 
     return math.sqrt(math.fabs(err))
@@ -335,5 +335,5 @@
         msg = "Transformation does not accept point"
         msg += " that are consistent with zero."
-        raise ValueError, msg
+        raise ValueError(msg)
     if x > 0 and y > 0:
         if dx is None:
@@ -343,5 +343,5 @@
         err = (2.0 * dx / x) ** 2 + (dy / y) ** 2
     else:
-        raise ValueError, "cannot compute this error"
+        raise ValueError("cannot compute this error")
     return math.sqrt(math.fabs(err))
 
@@ -357,5 +357,5 @@
         err = dx / x ** 2
     else:
-        raise ValueError, "Cannot compute this error"
+        raise ValueError("Cannot compute this error")
     return math.fabs(err)
 
@@ -371,5 +371,5 @@
         err = -1 / 2 * math.pow(x, -3.0 / 2.0) * dx
     else:
-        raise ValueError, "Cannot compute this error"
+        raise ValueError("Cannot compute this error")
     return math.fabs(err)
 
@@ -387,5 +387,5 @@
         msg = "Transformation does not accept point "
         msg += " that are consistent with zero."
-        raise ValueError, msg
+        raise ValueError(msg)
     if dx is None:
         dx = 0
