Index: src/sas/sasgui/perspectives/pr/__init__.py
===================================================================
--- src/sas/sasgui/perspectives/pr/__init__.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/pr/__init__.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -1,2 +1,2 @@
 PLUGIN_ID = "P(r) plug-in 1.0"
-from pr import *
+from .pr import *
Index: src/sas/sasgui/perspectives/pr/explore_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -35,5 +35,5 @@
 from sas.sasgui.plottools.plottables import Graph
 
-from pr_widgets import PrTextCtrl
+from .pr_widgets import PrTextCtrl
 
 # Default number of points on the output plot
@@ -331,5 +331,5 @@
         selection_msg = wx.StaticText(self, -1, "Select a dependent variable:")
         self.output_box = wx.ComboBox(self, -1, style=wx.CB_READONLY)
-        for item in self.results.outputs.keys():
+        for item in list(self.results.outputs.keys()):
             self.output_box.Append(item, "")
         self.output_box.SetStringSelection(DEFAULT_OUTPUT)
@@ -419,5 +419,5 @@
                 # This inversion failed, skip this D_max value
                 msg = "ExploreDialog: inversion failed "
-                msg += "for D_max=%s\n%s" % (str(d), sys.exc_value)
+                msg += "for D_max=%s\n%s" % (str(d), sys.exc_info()[1])
                 logger.error(msg)
 
Index: src/sas/sasgui/perspectives/pr/inversion_panel.py
===================================================================
--- src/sas/sasgui/perspectives/pr/inversion_panel.py	(revision cb62bd55ae79395ac6e01d8b2077f4d496625c41)
+++ src/sas/sasgui/perspectives/pr/inversion_panel.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -12,8 +12,8 @@
 from sas.sasgui.guiframe.events import StatusEvent
 from sas.sasgui.guiframe.panel_base import PanelBase
-from inversion_state import InversionState
-from pr_widgets import PrTextCtrl
-from pr_widgets import DataFileTextCtrl
-from pr_widgets import OutputTextCtrl
+from .inversion_state import InversionState
+from .pr_widgets import PrTextCtrl
+from .pr_widgets import DataFileTextCtrl
+from .pr_widgets import OutputTextCtrl
 from sas.sasgui.guiframe.documentation_window import DocumentationWindow
 
@@ -754,5 +754,5 @@
         except:
             # No estimate or bad estimate, either do nothing
-            logger.error("InversionControl._on_accept_alpha: %s" % sys.exc_value)
+            logger.error("InversionControl._on_accept_alpha: %s" % sys.exc_info()[1])
 
     def _on_accept_nterms(self, evt):
@@ -770,5 +770,5 @@
         except:
             # No estimate or bad estimate, either do nothing
-            logger.error("InversionControl._on_accept_nterms: %s" % sys.exc_value)
+            logger.error("InversionControl._on_accept_nterms: %s" % sys.exc_info()[1])
 
     def clear_panel(self):
@@ -901,5 +901,5 @@
                 message += "than the number of points"
                 wx.PostEvent(self._manager.parent, StatusEvent(status=message))
-                raise ValueError, message
+                raise ValueError(message)
             self.nfunc_ctl.SetBackgroundColour(wx.WHITE)
             self.nfunc_ctl.Refresh()
@@ -957,5 +957,5 @@
         Invoke the d_max exploration dialog
         """
-        from explore_dialog import ExploreDialog
+        from .explore_dialog import ExploreDialog
         if self._manager._last_pr is not None:
             pr = self._manager._create_plot_pr()
@@ -1009,5 +1009,5 @@
                 self._set_analysis(True)
             except:
-                msg = "InversionControl._change_file: %s" % sys.exc_value
+                msg = "InversionControl._change_file: %s" % sys.exc_info()[1]
                 logger.error(msg)
 
Index: src/sas/sasgui/perspectives/pr/inversion_state.py
===================================================================
--- src/sas/sasgui/perspectives/pr/inversion_state.py	(revision 1fa4f7368e26981352615cbfb337a581ed97031f)
+++ src/sas/sasgui/perspectives/pr/inversion_state.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -238,5 +238,5 @@
             msg = "InversionState no longer supports non-CanSAS"
             msg += " format for P(r) files"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if node.get('version') and node.get('version') == '1.0':
@@ -254,5 +254,5 @@
                 except:
                     msg = "InversionState.fromXML: Could not read "
-                    msg += "timestamp\n %s" % sys.exc_value
+                    msg += "timestamp\n %s" % sys.exc_info()[1]
                     logger.error(msg)
 
@@ -434,5 +434,5 @@
         except:
             msg = "XML document does not contain P(r) "
-            msg += "information.\n %s" % sys.exc_value
+            msg += "information.\n %s" % sys.exc_info()[1]
             logger.info(msg)
 
@@ -481,5 +481,5 @@
                         output.append(sas_entry)
         else:
-            raise RuntimeError, "%s is not a file" % path
+            raise RuntimeError("%s is not a file" % path)
 
         # Return output consistent with the loader's api
@@ -525,5 +525,5 @@
             msg = "The cansas writer expects a Data1D "
             msg += "instance: %s" % str(datainfo.__class__.__name__)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         # Create basic XML document
Index: src/sas/sasgui/perspectives/pr/pr.py
===================================================================
--- src/sas/sasgui/perspectives/pr/pr.py	(revision cb62bd55ae79395ac6e01d8b2077f4d496625c41)
+++ src/sas/sasgui/perspectives/pr/pr.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -15,5 +15,5 @@
 # Make sure the option of saving each curve is available
 # Use the I(q) curve as input and compare the output to P(r)
-from __future__ import print_function
+
 
 import sys
@@ -33,5 +33,5 @@
 import sas.sascalc.dataloader
 
-from pr_widgets import load_error
+from .pr_widgets import load_error
 from sas.sasgui.guiframe.plugin_base import PluginBase
 
@@ -107,5 +107,5 @@
 
         # Associate the inversion state reader with .prv files
-        from inversion_state import Reader
+        from .inversion_state import Reader
 
         # Create a CanSAS/Pr reader
@@ -151,5 +151,5 @@
                 msg = "Pr.set_state: datainfo parameter cannot "
                 msg += "be None in standalone mode"
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
 
             # Ensuring that plots are coordinated correctly
@@ -185,5 +185,5 @@
             self.control_panel.set_state(state)
         except:
-            logger.error("prview.set_state: %s" % sys.exc_value)
+            logger.error("prview.set_state: %s" % sys.exc_info()[1])
 
 
@@ -195,5 +195,5 @@
 
         """
-        from inversion_panel import HelpDialog
+        from .inversion_panel import HelpDialog
         dialog = HelpDialog(None, -1)
         if dialog.ShowModal() == wx.ID_OK:
@@ -369,5 +369,5 @@
         Redisplay P(r) with a different number of points
         """
-        from inversion_panel import PrDistDialog
+        from .inversion_panel import PrDistDialog
         dialog = PrDistDialog(None, -1)
         dialog.set_content(self._pr_npts)
@@ -452,5 +452,5 @@
         # Notify the user if we could not read the file
         if dataread is None:
-            raise RuntimeError, "Invalid data"
+            raise RuntimeError("Invalid data")
 
         x = None
@@ -472,5 +472,5 @@
                 if dataread is None:
                     return x, y, err
-                raise RuntimeError, "This tool can only read 1D data"
+                raise RuntimeError("This tool can only read 1D data")
 
         self._current_file_data.x = x
@@ -512,5 +512,5 @@
                     data_err = np.append(data_err, err)
                 except:
-                    logger.error(sys.exc_value)
+                    logger.error(sys.exc_info()[1])
 
         if scale is not None:
@@ -563,5 +563,5 @@
                         data_err = np.append(data_err, err)
                     except:
-                        logger.error(sys.exc_value)
+                        logger.error(sys.exc_info()[1])
                 elif line.find("The 6 columns") >= 0:
                     data_started = True
@@ -720,5 +720,5 @@
             Start a calculation thread
         """
-        from pr_thread import CalcPr
+        from .pr_thread import CalcPr
 
         # If a thread is already started, stop it
@@ -850,11 +850,11 @@
                 pr = self._create_file_pr(data)
             except:
-                status = "Problem reading data: %s" % sys.exc_value
+                status = "Problem reading data: %s" % sys.exc_info()[1]
                 wx.PostEvent(self.parent, StatusEvent(status=status))
-                raise RuntimeError, status
+                raise RuntimeError(status)
 
             # If the file contains nothing, just return
             if pr is None:
-                raise RuntimeError, "Loaded data is invalid"
+                raise RuntimeError("Loaded data is invalid")
 
             self.pr = pr
@@ -906,5 +906,5 @@
             msg = "pr.save_data: the data being saved is not a"
             msg += " sas.data_info.Data1D object"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
     def setup_plot_inversion(self, alpha, nfunc, d_max, q_min=None, q_max=None,
@@ -929,5 +929,5 @@
                 self.perform_inversion()
         except:
-            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value))
+            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_info()[1]))
 
     def estimate_plot_inversion(self, alpha, nfunc, d_max,
@@ -953,5 +953,5 @@
                 self.perform_estimate()
         except:
-            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value))
+            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_info()[1]))
 
     def _create_plot_pr(self, estimate=False):
@@ -1034,5 +1034,5 @@
                 self.perform_inversion()
         except:
-            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value))
+            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_info()[1]))
 
     def estimate_file_inversion(self, alpha, nfunc, d_max, data,
@@ -1057,5 +1057,5 @@
                 self.perform_estimate()
         except:
-            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_value))
+            wx.PostEvent(self.parent, StatusEvent(status=sys.exc_info()[1]))
 
     def _create_file_pr(self, data):
@@ -1086,5 +1086,5 @@
             x, y, err = data.x, data.y, data.dy
         except:
-            load_error(sys.exc_value)
+            load_error(sys.exc_info()[1])
             return None
 
@@ -1125,5 +1125,5 @@
             return pr
         except:
-            load_error(sys.exc_value)
+            load_error(sys.exc_info()[1])
         return None
 
@@ -1132,5 +1132,5 @@
             Perform parameter estimation
         """
-        from pr_thread import EstimatePr
+        from .pr_thread import EstimatePr
 
         # If a thread is already started, stop it
@@ -1162,5 +1162,5 @@
             Perform parameter estimation
         """
-        from pr_thread import EstimateNT
+        from .pr_thread import EstimateNT
 
         # If a thread is already started, stop it
@@ -1239,5 +1239,5 @@
             Create and return a list of panel objects
         """
-        from inversion_panel import InversionControl
+        from .inversion_panel import InversionControl
 
         self.parent = parent
@@ -1287,5 +1287,5 @@
                 msg += "Please select one.\n"
                 if len(data_list) > 1:
-                    from pr_widgets import DataDialog
+                    from .pr_widgets import DataDialog
                     dlg = DataDialog(data_list=data_1d_list, text=msg)
                     if dlg.ShowModal() == wx.ID_OK:
@@ -1307,5 +1307,5 @@
                     self.control_panel._change_file(evt=None, data=data)
                 except:
-                    msg = "Prview Set_data: " + str(sys.exc_value)
+                    msg = "Prview Set_data: " + str(sys.exc_info()[1])
                     wx.PostEvent(self.parent, StatusEvent(status=msg, info="error"))
             else:
Index: src/sas/sasgui/perspectives/pr/pr_thread.py
===================================================================
--- src/sas/sasgui/perspectives/pr/pr_thread.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sasgui/perspectives/pr/pr_thread.py	(revision fa81e94af983227efded2314c2c544f98e2c56ba)
@@ -43,5 +43,5 @@
         except:
             if self.error_func is not None:
-                self.error_func("CalcPr.compute: %s" % sys.exc_value)
+                self.error_func("CalcPr.compute: %s" % sys.exc_info()[1])
 
 class EstimatePr(CalcThread):
@@ -71,5 +71,5 @@
         except:
             if self.error_func is not None:
-                self.error_func("EstimatePr.compute: %s" % sys.exc_value)
+                self.error_func("EstimatePr.compute: %s" % sys.exc_info()[1])
 
 class EstimateNT(CalcThread):
@@ -111,3 +111,3 @@
         except:
             if self.error_func is not None:
-                self.error_func("EstimatePr2.compute: %s" % sys.exc_value)
+                self.error_func("EstimatePr2.compute: %s" % sys.exc_info()[1])
