Index: src/sas/sascalc/calculator/BaseComponent.py
===================================================================
--- src/sas/sascalc/calculator/BaseComponent.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/calculator/BaseComponent.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -143,5 +143,5 @@
                 qdist[1].__class__.__name__ != 'ndarray':
                 msg = "evalDistribution expects a list of 2 ndarrays"
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
 
             # Extract qx and qy for code clarity
@@ -167,5 +167,5 @@
             mesg = "evalDistribution is expecting an ndarray of scalar q-values"
             mesg += " or a list [qx,qy] where qx,qy are 2D ndarrays."
-            raise RuntimeError, mesg
+            raise RuntimeError(mesg)
 
 
@@ -228,5 +228,5 @@
                     return
 
-        raise ValueError, "Model does not contain parameter %s" % name
+        raise ValueError("Model does not contain parameter %s" % name)
 
     def getParam(self, name):
@@ -250,5 +250,5 @@
                     return self.params[item]
 
-        raise ValueError, "Model does not contain parameter %s" % name
+        raise ValueError("Model does not contain parameter %s" % name)
 
     def getParamList(self):
@@ -294,20 +294,20 @@
         add
         """
-        raise ValueError, "Model operation are no longer supported"
+        raise ValueError("Model operation are no longer supported")
     def __sub__(self, other):
         """
         sub
         """
-        raise ValueError, "Model operation are no longer supported"
+        raise ValueError("Model operation are no longer supported")
     def __mul__(self, other):
         """
         mul
         """
-        raise ValueError, "Model operation are no longer supported"
+        raise ValueError("Model operation are no longer supported")
     def __div__(self, other):
         """
         div
         """
-        raise ValueError, "Model operation are no longer supported"
+        raise ValueError("Model operation are no longer supported")
 
 
Index: src/sas/sascalc/calculator/instrument.py
===================================================================
--- src/sas/sascalc/calculator/instrument.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/calculator/instrument.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -324,5 +324,5 @@
             plt.show()
         except:
-            raise RuntimeError, "Can't import matplotlib required to plot..."
+            raise RuntimeError("Can't import matplotlib required to plot...")
 
 
Index: src/sas/sascalc/calculator/resolution_calculator.py
===================================================================
--- src/sas/sascalc/calculator/resolution_calculator.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/calculator/resolution_calculator.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -208,5 +208,5 @@
         if wavelength == 0:
             msg = "Can't compute the resolution: the wavelength is zero..."
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         return self.intensity
 
@@ -503,5 +503,5 @@
         # otherwise
         else:
-            raise ValueError, " Improper input..."
+            raise ValueError(" Improper input...")
         # get them squared
         sigma = x_comp * x_comp
@@ -766,5 +766,5 @@
         """
         if len(size) < 1 or len(size) > 2:
-            raise RuntimeError, "The length of the size must be one or two."
+            raise RuntimeError("The length of the size must be one or two.")
         self.aperture.set_source_size(size)
 
@@ -783,5 +783,5 @@
         """
         if len(size) < 1 or len(size) > 2:
-            raise RuntimeError, "The length of the size must be one or two."
+            raise RuntimeError("The length of the size must be one or two.")
         self.aperture.set_sample_size(size)
 
@@ -806,5 +806,5 @@
         """
         if len(distance) < 1 or len(distance) > 2:
-            raise RuntimeError, "The length of the size must be one or two."
+            raise RuntimeError("The length of the size must be one or two.")
         self.aperture.set_sample_distance(distance)
 
@@ -816,5 +816,5 @@
         """
         if len(distance) < 1 or len(distance) > 2:
-            raise RuntimeError, "The length of the size must be one or two."
+            raise RuntimeError("The length of the size must be one or two.")
         self.sample.set_distance(distance)
 
@@ -826,5 +826,5 @@
         """
         if len(distance) < 1 or len(distance) > 2:
-            raise RuntimeError, "The length of the size must be one or two."
+            raise RuntimeError("The length of the size must be one or two.")
         self.detector.set_distance(distance)
 
@@ -998,5 +998,5 @@
             pix_y_size = detector_pix_size[1]
         else:
-            raise ValueError, " Input value format error..."
+            raise ValueError(" Input value format error...")
         # Sample to detector distance = sample slit to detector
         # minus sample offset
Index: src/sas/sascalc/calculator/sas_gen.py
===================================================================
--- src/sas/sascalc/calculator/sas_gen.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/calculator/sas_gen.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -32,5 +32,5 @@
         factor = MFACTOR_MT
     else:
-        raise ValueError, "Invalid valueunit"
+        raise ValueError("Invalid valueunit")
     sld_m = factor * mag
     return sld_m
@@ -172,5 +172,5 @@
             if len(x[1]) > 0:
                 msg = "Not a 1D."
-                raise ValueError, msg
+                raise ValueError(msg)
             i_out = np.zeros_like(x[0])
             # 1D I is found at y =0 in the 2D pattern
@@ -179,5 +179,5 @@
         else:
             msg = "Q must be given as list of qx's and qy's"
-            raise ValueError, msg
+            raise ValueError(msg)
 
     def runXY(self, x=0.0):
@@ -194,5 +194,5 @@
         else:
             msg = "Q must be given as list of qx's and qy's"
-            raise ValueError, msg
+            raise ValueError(msg)
 
     def evalDistribution(self, qdist):
@@ -212,5 +212,5 @@
             mesg = "evalDistribution is expecting an ndarray of "
             mesg += "a list [qx,qy] where qx,qy are arrays."
-            raise RuntimeError, mesg
+            raise RuntimeError(mesg)
 
 class OMF2SLD(object):
@@ -313,15 +313,15 @@
         msg = "Error: Inconsistent data length."
         if len(self.pos_x) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(self.pos_y) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(self.pos_z) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(self.mx) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(self.my) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(self.mz) != length:
-            raise ValueError, msg
+            raise ValueError(msg)
 
     def remove_null_points(self, remove=False, recenter=False):
@@ -413,5 +413,5 @@
                         msg = "Error: \n"
                         msg += "We accept only m as meshunit"
-                        raise ValueError, msg
+                        raise ValueError(msg)
                 if s_line[0].lower().count("xbase") > 0:
                     xbase = s_line[1].lstrip()
@@ -483,5 +483,5 @@
             msg = "%s is not supported: \n" % path
             msg += "We accept only Text format OMF file."
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
 class PDBReader(object):
@@ -603,5 +603,5 @@
             return output
         except:
-            raise RuntimeError, "%s is not a sld file" % path
+            raise RuntimeError("%s is not a sld file" % path)
 
     def write(self, path, data):
@@ -695,5 +695,5 @@
             return output
         except:
-            raise RuntimeError, "%s is not a sld file" % path
+            raise RuntimeError("%s is not a sld file" % path)
 
     def write(self, path, data):
@@ -704,7 +704,7 @@
         """
         if path is None:
-            raise ValueError, "Missing the file path."
+            raise ValueError("Missing the file path.")
         if data is None:
-            raise ValueError, "Missing the data to save."
+            raise ValueError("Missing the data to save.")
         x_val = data.pos_x
         y_val = data.pos_y
Index: src/sas/sascalc/corfunc/corfunc_calculator.py
===================================================================
--- src/sas/sascalc/corfunc/corfunc_calculator.py	(revision ff11b21937c0657ed4709a35bf3ee586f4e3148c)
+++ src/sas/sascalc/corfunc/corfunc_calculator.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -80,5 +80,5 @@
         # Only process data of the class Data1D
         if not issubclass(data.__class__, Data1D):
-            raise ValueError, "Data must be of the type DataLoader.Data1D"
+            raise ValueError("Data must be of the type DataLoader.Data1D")
 
         # Prepare the data
@@ -151,5 +151,5 @@
             err = ("Incorrect transform type supplied, must be 'fourier'",
                 " or 'hilbert'")
-            raise ValueError, err
+            raise ValueError(err)
 
         self._transform_thread.queue()
Index: src/sas/sascalc/data_util/nxsunit.py
===================================================================
--- src/sas/sascalc/data_util/nxsunit.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/nxsunit.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -189,5 +189,5 @@
 
 def _check(expect,get):
-    if expect != get: raise ValueError, "Expected %s but got %s"%(expect,get)
+    if expect != get: raise ValueError("Expected %s but got %s"%(expect,get))
      #print expect,"==",get
 
Index: src/sas/sascalc/data_util/odict.py
===================================================================
--- src/sas/sascalc/data_util/odict.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/odict.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -612,5 +612,5 @@
         """
         if len(args) > 1:
-            raise TypeError, ('pop expected at most 2 arguments, got %s' %
+            raise TypeError('pop expected at most 2 arguments, got %s' %
                 (len(args) + 1))
         if key in self:
Index: src/sas/sascalc/data_util/registry.py
===================================================================
--- src/sas/sascalc/data_util/registry.py	(revision b699768550de9d4b35b087234ec1d2a461922bab)
+++ src/sas/sascalc/data_util/registry.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -105,5 +105,5 @@
         # Raise an error if there are no matching extensions
         if len(loaders) == 0:
-            raise ValueError, "Unknown file type for "+path
+            raise ValueError("Unknown file type for "+path)
         # All done
         return loaders
@@ -159,10 +159,10 @@
     try:  reg.load('hello.cx2')
     except CxError: pass # correct failure
-    else: raise AssertError,"Incorrect error on load failure"
+    else: raise AssertError("Incorrect error on load failure")
     # Make sure the case of no loaders fails correctly
     try: reg.load('hello.missing')
     except ValueError,msg:
         assert str(msg)=="Unknown file type for hello.missing",'Message: <%s>'%(msg)
-    else: raise AssertError,"No error raised for missing extension"
+    else: raise AssertError("No error raised for missing extension")
     assert reg.formats() == ['new_cx']
     assert reg.extensions() == ['.cx','.cx.gz','.cx1','.cx1.gz','.cx2','.gz']
Index: src/sas/sascalc/dataloader/data_info.py
===================================================================
--- src/sas/sascalc/dataloader/data_info.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/dataloader/data_info.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -715,5 +715,5 @@
                 self.y_unit = '1/cm'
         except: # the data is not recognized/supported, and the user is notified
-            raise(TypeError, 'data not recognized, check documentation for supported 1D data formats')
+            raise TypeError
 
     def __str__(self):
@@ -795,5 +795,5 @@
                 len(self.y) != len(other.y):
                 msg = "Unable to perform operation: data length are not equal"
-                raise ValueError, msg
+                raise ValueError(msg)
             # Here we could also extrapolate between data points
             TOLERANCE = 0.01
@@ -801,5 +801,5 @@
                 if math.fabs((self.x[i] - other.x[i])/self.x[i]) > TOLERANCE:
                     msg = "Incompatible data sets: x-values do not match"
-                    raise ValueError, msg
+                    raise ValueError(msg)
 
             # Check that the other data set has errors, otherwise
@@ -875,5 +875,5 @@
         if not isinstance(other, Data1D):
             msg = "Unable to perform operation: different types of data set"
-            raise ValueError, msg
+            raise ValueError(msg)
         return True
 
@@ -947,5 +947,5 @@
 
         if len(self.detector) > 0:
-            raise RuntimeError, "Data2D: Detector bank already filled at init"
+            raise RuntimeError("Data2D: Detector bank already filled at init")
 
     def __str__(self):
@@ -1019,12 +1019,12 @@
                 len(self.qy_data) != len(other.qy_data):
                 msg = "Unable to perform operation: data length are not equal"
-                raise ValueError, msg
+                raise ValueError(msg)
             for ind in range(len(self.data)):
                 if math.fabs((self.qx_data[ind] - other.qx_data[ind])/self.qx_data[ind]) > TOLERANCE:
                     msg = "Incompatible data sets: qx-values do not match: %s %s" % (self.qx_data[ind], other.qx_data[ind])
-                    raise ValueError, msg
+                    raise ValueError(msg)
                 if math.fabs((self.qy_data[ind] - other.qy_data[ind])/self.qy_data[ind]) > TOLERANCE:
                     msg = "Incompatible data sets: qy-values do not match: %s %s" % (self.qy_data[ind], other.qy_data[ind])
-                    raise ValueError, msg
+                    raise ValueError(msg)
 
             # Check that the scales match
@@ -1107,5 +1107,5 @@
         if not isinstance(other, Data2D):
             msg = "Unable to perform operation: different types of data set"
-            raise ValueError, msg
+            raise ValueError(msg)
         return True
 
Index: src/sas/sascalc/dataloader/loader.py
===================================================================
--- src/sas/sascalc/dataloader/loader.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sascalc/dataloader/loader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -295,5 +295,5 @@
         # Raise an error if there are no matching extensions
         if len(writers) == 0:
-            raise ValueError, "Unknown file type for " + path
+            raise ValueError("Unknown file type for " + path)
         # All done
         return writers
Index: src/sas/sascalc/dataloader/manipulations.py
===================================================================
--- src/sas/sascalc/dataloader/manipulations.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/dataloader/manipulations.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -81,5 +81,5 @@
     """
     if data2d.data is None or data2d.x_bins is None or data2d.y_bins is None:
-        raise ValueError, "Can't convert this data: data=None..."
+        raise ValueError("Can't convert this data: data=None...")
     new_x = numpy.tile(data2d.x_bins, (len(data2d.y_bins), 1))
     new_y = numpy.tile(data2d.y_bins, (len(data2d.x_bins), 1))
@@ -146,5 +146,5 @@
             msg = "_Slab._avg: invalid number of "
             msg += " detectors: %g" % len(data2D.detector)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         # Get data
@@ -168,5 +168,5 @@
             nbins = int(math.ceil((self.y_max - y_min) / self.bin_width))
         else:
-            raise RuntimeError, "_Slab._avg: unrecognized axis %s" % str(maj)
+            raise RuntimeError("_Slab._avg: unrecognized axis %s" % str(maj))
 
         x = numpy.zeros(nbins)
@@ -229,5 +229,5 @@
         if not idx.any():
             msg = "Average Error: No points inside ROI to average..."
-            raise ValueError, msg
+            raise ValueError(msg)
         return Data1D(x=x[idx], y=y[idx], dy=err_y[idx])
 
@@ -302,5 +302,5 @@
             msg = "Circular averaging: invalid number "
             msg += "of detectors: %g" % len(data2D.detector)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         # Get data
         data = data2D.data[numpy.isfinite(data2D.data)]
@@ -464,5 +464,5 @@
         if len(data2D.q_data) is None:
             msg = "Circular averaging: invalid q_data: %g" % data2D.q_data
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         # Build array of Q intervals
@@ -488,5 +488,5 @@
             ## No need to calculate the frac when all data are within range
             if self.r_min >= self.r_max:
-                raise ValueError, "Limit Error: min > max"
+                raise ValueError("Limit Error: min > max")
 
             if self.r_min <= q_value and q_value <= self.r_max:
@@ -539,5 +539,5 @@
         if not idx.any():
             msg = "Average Error: No points inside ROI to average..."
-            raise ValueError, msg
+            raise ValueError(msg)
 
         return Data1D(x=x[idx], y=y[idx], dy=err_y[idx], dx=d_x)
@@ -580,5 +580,5 @@
         """
         if data2D.__class__.__name__ not in ["Data2D", "plottable_2D"]:
-            raise RuntimeError, "Ring averaging only take plottable_2D objects"
+            raise RuntimeError("Ring averaging only take plottable_2D objects")
 
         Pi = math.pi
@@ -640,5 +640,5 @@
         if not idx.any():
             msg = "Average Error: No points inside ROI to average..."
-            raise ValueError, msg
+            raise ValueError(msg)
         #elif len(phi_bins[idx])!= self.nbins_phi:
         #    print "resulted",self.nbins_phi- len(phi_bins[idx])
@@ -765,5 +765,5 @@
         """
         if data2D.__class__.__name__ not in ["Data2D", "plottable_2D"]:
-            raise RuntimeError, "Ring averaging only take plottable_2D objects"
+            raise RuntimeError("Ring averaging only take plottable_2D objects")
         Pi = math.pi
 
@@ -931,5 +931,5 @@
         if not idx.any():
             msg = "Average Error: No points inside sector of ROI to average..."
-            raise ValueError, msg
+            raise ValueError(msg)
         #elif len(y[idx])!= self.nbins:
         #    print "resulted",self.nbins- len(y[idx]),
@@ -1007,5 +1007,5 @@
         """
         if data2D.__class__.__name__ not in ["Data2D", "plottable_2D"]:
-            raise RuntimeError, "Ring cut only take plottable_2D objects"
+            raise RuntimeError("Ring cut only take plottable_2D objects")
 
         # Get data
@@ -1055,5 +1055,5 @@
         """
         if data2D.__class__.__name__ not in ["Data2D", "plottable_2D"]:
-            raise RuntimeError, "Boxcut take only plottable_2D objects"
+            raise RuntimeError("Boxcut take only plottable_2D objects")
         # Get qx_ and qy_data
         qx_data = data2D.qx_data
@@ -1106,5 +1106,5 @@
         """
         if data2D.__class__.__name__ not in ["Data2D", "plottable_2D"]:
-            raise RuntimeError, "Sectorcut take only plottable_2D objects"
+            raise RuntimeError("Sectorcut take only plottable_2D objects")
         Pi = math.pi
         # Get data
Index: src/sas/sascalc/dataloader/readers/abs_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/abs_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/abs_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -50,5 +50,5 @@
                     input_f = open(path,'r')
                 except:
-                    raise  RuntimeError, "abs_reader: cannot open %s" % path
+                    raise  RuntimeError("abs_reader: cannot open %s" % path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -99,5 +99,5 @@
                             #goes to ASC reader
                             msg = "abs_reader: cannot open %s" % path
-                            raise  RuntimeError, msg
+                            raise  RuntimeError(msg)
                         
                         # Distance in meters
@@ -114,5 +114,5 @@
                             #goes to ASC reader
                             msg = "abs_reader: cannot open %s" % path
-                            raise  RuntimeError, msg
+                            raise  RuntimeError(msg)
                         # Transmission
                         try:
@@ -223,9 +223,9 @@
                 if not len(y) == len(dy):
                     msg = "abs_reader: y and dy have different length"
-                    raise ValueError, msg
+                    raise ValueError(msg)
                 # If the data length is zero, consider this as
                 # though we were not able to read the file.
                 if len(x) == 0:
-                    raise ValueError, "ascii_reader: could not load file"
+                    raise ValueError("ascii_reader: could not load file")
                 
                 output.x = x[x != 0]
@@ -246,4 +246,4 @@
                 return output
         else:
-            raise RuntimeError, "%s is not a file" % path
+            raise RuntimeError("%s is not a file" % path)
         return None
Index: src/sas/sascalc/dataloader/readers/ascii_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/ascii_reader.py	(revision 235f514ba93b57fa63e44309f182acef0b98bb55)
+++ src/sas/sascalc/dataloader/readers/ascii_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -64,5 +64,5 @@
                     input_f = open(path,'rb')
                 except:
-                    raise  RuntimeError, "ascii_reader: cannot open %s" % path
+                    raise  RuntimeError("ascii_reader: cannot open %s" % path)
                 buff = input_f.read()
                 lines = buff.splitlines()
@@ -173,16 +173,16 @@
                 if not is_data:
                     msg = "ascii_reader: x has no data"
-                    raise RuntimeError, msg
+                    raise RuntimeError(msg)
                 # Sanity check
                 if has_error_dy == True and not len(ty) == len(tdy):
                     msg = "ascii_reader: y and dy have different length"
-                    raise RuntimeError, msg
+                    raise RuntimeError(msg)
                 if has_error_dx == True and not len(tx) == len(tdx):
                     msg = "ascii_reader: y and dy have different length"
-                    raise RuntimeError, msg
+                    raise RuntimeError(msg)
                 # If the data length is zero, consider this as
                 # though we were not able to read the file.
                 if len(tx) == 0:
-                    raise RuntimeError, "ascii_reader: could not load file"
+                    raise RuntimeError("ascii_reader: could not load file")
 
                 #Let's re-order the data to make cal.
@@ -222,9 +222,9 @@
                 output.meta_data['loader'] = self.type_name
                 if len(output.x) < 1:
-                    raise RuntimeError, "%s is empty" % path
+                    raise RuntimeError("%s is empty" % path)
                 return output
 
         else:
-            raise RuntimeError, "%s is not a file" % path
+            raise RuntimeError("%s is not a file" % path)
         return None
 
Index: src/sas/sascalc/dataloader/readers/cansas_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/dataloader/readers/cansas_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -1479,5 +1479,5 @@
                                 logger.info(err_mess)
                             else:
-                                raise ValueError, err_mess
+                                raise ValueError(err_mess)
                     else:
                         err_mess = "CanSAS reader: unrecognized %s unit [%s];"\
@@ -1488,5 +1488,5 @@
                             logger.info(err_mess)
                         else:
-                            raise ValueError, err_mess
+                            raise ValueError(err_mess)
                 else:
                     exec "storage.%s = value" % variable
Index: src/sas/sascalc/dataloader/readers/danse_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/danse_reader.py	(revision 235f514ba93b57fa63e44309f182acef0b98bb55)
+++ src/sas/sascalc/dataloader/readers/danse_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -56,5 +56,5 @@
                 datafile = open(filename, 'r')
             except:
-                raise  RuntimeError,"danse_reader cannot open %s" % (filename)
+                raise  RuntimeError("danse_reader cannot open %s" % (filename))
         
             # defaults
@@ -271,5 +271,5 @@
             if not fversion >= 1.0:
                 msg = "Danse_reader can't read this file %s" % filename
-                raise ValueError, msg
+                raise ValueError(msg)
             else:
                 logger.info("Danse_reader Reading %s \n" % filename)
Index: src/sas/sascalc/dataloader/readers/hfir1d_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/hfir1d_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/hfir1d_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -49,5 +49,5 @@
                     input_f = open(path,'r')
                 except:
-                    raise  RuntimeError, "hfir1d_reader: cannot open %s" % path
+                    raise  RuntimeError("hfir1d_reader: cannot open %s" % path)
                 buff = input_f.read()
                 lines = buff.split('\n')
@@ -99,13 +99,13 @@
                 if not len(y) == len(dy):
                     msg = "hfir1d_reader: y and dy have different length"
-                    raise RuntimeError, msg
+                    raise RuntimeError(msg)
                 if not len(x) == len(dx):
                     msg = "hfir1d_reader: x and dx have different length"
-                    raise RuntimeError, msg
+                    raise RuntimeError(msg)
 
                 # If the data length is zero, consider this as
                 # though we were not able to read the file.
                 if len(x) == 0:
-                    raise RuntimeError, "hfir1d_reader: could not load file"
+                    raise RuntimeError("hfir1d_reader: could not load file")
                
                 output.x = x
@@ -126,4 +126,4 @@
                 return output
         else:
-            raise RuntimeError, "%s is not a file" % path
+            raise RuntimeError("%s is not a file" % path)
         return None
Index: src/sas/sascalc/dataloader/readers/nexus_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/nexus_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/nexus_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -35,5 +35,5 @@
             msg = "Error reading Nexus file: Nexus package is missing.\n"
             msg += "  Get it from http://http://www.nexusformat.org/"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         
         # Instantiate data object
Index: src/sas/sascalc/dataloader/readers/red2d_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/red2d_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -70,6 +70,5 @@
         """ Read file """
         if not os.path.isfile(filename):
-            raise ValueError, \
-            "Specified file %s is not a regular file" % filename
+            raise ValueError("Specified file %s is not a regular file" % filename)
 
         # Read file
@@ -232,5 +231,5 @@
         except:
             msg = "red2d_reader: Can't read this file: Not a proper file format"
-            raise ValueError, msg
+            raise ValueError(msg)
         ## Get the all data: Let's HARDcoding; Todo find better way
         # Defaults
Index: src/sas/sascalc/dataloader/readers/sesans_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/dataloader/readers/sesans_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -57,5 +57,5 @@
                     input_f = open(path,'rb')
                 except:
-                    raise  RuntimeError, "sesans_reader: cannot open %s" % path
+                    raise  RuntimeError("sesans_reader: cannot open %s" % path)
                 buff = input_f.read()
                 lines = buff.splitlines()
@@ -158,9 +158,9 @@
 
                 if len(output.x) < 1:
-                    raise RuntimeError, "%s is empty" % path
+                    raise RuntimeError("%s is empty" % path)
                 return output
 
         else:
-            raise RuntimeError, "%s is not a file" % path
+            raise RuntimeError("%s is not a file" % path)
         return None
 
Index: src/sas/sascalc/dataloader/readers/tiff_reader.py
===================================================================
--- src/sas/sascalc/dataloader/readers/tiff_reader.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sascalc/dataloader/readers/tiff_reader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -44,5 +44,5 @@
         except:
             msg = "tiff_reader: could not load file. Missing Image module."
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         
         # Instantiate data object
@@ -54,5 +54,5 @@
             im = Image.open(filename)
         except:
-            raise  RuntimeError, "cannot open %s"%(filename)
+            raise  RuntimeError("cannot open %s"%(filename))
         data = im.getdata()
 
Index: src/sas/sascalc/file_converter/cansas_writer.py
===================================================================
--- src/sas/sascalc/file_converter/cansas_writer.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/file_converter/cansas_writer.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -32,5 +32,5 @@
         valid_class = all([issubclass(data.__class__, Data1D) for data in frame_data])
         if not valid_class:
-            raise RuntimeError, ("The cansas writer expects an array of "
+            raise RuntimeError("The cansas writer expects an array of "
                 "Data1D instances")
 
Index: src/sas/sascalc/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/fit/AbstractFitEngine.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/fit/AbstractFitEngine.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -250,5 +250,5 @@
             msg = "FitData1D: invalid error array "
             msg += "%d <> %d" % (np.shape(self.dy), np.size(fx))
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx]
             
Index: src/sas/sascalc/fit/Loader.py
===================================================================
--- src/sas/sascalc/fit/Loader.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sascalc/fit/Loader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -57,7 +57,7 @@
             # Sanity check
             if not len(self.x) == len(self.dx):
-                raise ValueError, "x and dx have different length"
+                raise ValueError("x and dx have different length")
             if not len(self.y) == len(self.dy):
-                raise ValueError, "y and dy have different length"
+                raise ValueError("y and dy have different length")
             
             
Index: src/sas/sascalc/fit/MultiplicationModel.py
===================================================================
--- src/sas/sascalc/fit/MultiplicationModel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/fit/MultiplicationModel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -245,5 +245,5 @@
                     return
 
-        raise ValueError, "Model does not contain parameter %s" % name
+        raise ValueError("Model does not contain parameter %s" % name)
 
 
Index: src/sas/sascalc/fit/expression.py
===================================================================
--- src/sas/sascalc/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/fit/expression.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -237,5 +237,5 @@
         if independent == emptyset:
             cycleset = ", ".join(str(s) for s in left)
-            raise ValueError,"Cyclic dependencies amongst %s"%cycleset
+            raise ValueError("Cyclic dependencies amongst %s"%cycleset)
 
         # The possibly resolvable items are those that depend on the independents
@@ -265,8 +265,8 @@
         n.sort()
         items = list(items); items.sort()
-        raise Exception,"%s expect %s to contain %s for %s"%(msg,n,items,pairs)
+        raise Exception("%s expect %s to contain %s for %s"%(msg,n,items,pairs))
     for lo,hi in pairs:
         if lo in n and hi in n and n.index(lo) >= n.index(hi):
-            raise Exception,"%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs)
+            raise Exception("%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs))
 
 def test_deps():
@@ -288,5 +288,5 @@
     try: n = order_dependencies(pairs)
     except ValueError: pass
-    else: raise Exception,"test3 expect ValueError exception for %s"%(pairs,)
+    else: raise Exception("test3 expect ValueError exception for %s"%(pairs,))
 
     # large test for gross speed check
Index: src/sas/sascalc/fit/pluginmodel.py
===================================================================
--- src/sas/sascalc/fit/pluginmodel.py	(revision 5213d22cc2537cc6875bff5b448ef1c8caadfcd8)
+++ src/sas/sascalc/fit/pluginmodel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -35,5 +35,5 @@
             return self.function(x_val)*self.function(y_val)
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError("Tuples are not allowed as input to BaseComponent models")
         else:
             return self.function(x)
@@ -52,5 +52,5 @@
             return self.function(x[0])*self.function(x[1])
         elif x.__class__.__name__ == 'tuple':
-            raise ValueError, "Tuples are not allowed as input to BaseComponent models"
+            raise ValueError("Tuples are not allowed as input to BaseComponent models")
         else:
             return self.function(x)
Index: src/sas/sascalc/invariant/invariant.py
===================================================================
--- src/sas/sascalc/invariant/invariant.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/invariant/invariant.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -424,5 +424,5 @@
         if not issubclass(data.__class__, LoaderData1D):
             #Process only data that inherited from DataLoader.Data_info.Data1D
-            raise ValueError, "Data must be of type DataLoader.Data1D"
+            raise ValueError("Data must be of type DataLoader.Data1D")
         #from copy import deepcopy
         new_data = (self._scale * data) - self._background
@@ -484,5 +484,5 @@
             msg = "Length x and y must be equal"
             msg += " and greater than 1; got x=%s, y=%s" % (len(data.x), len(data.y))
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             # Take care of smeared data
@@ -533,5 +533,5 @@
             msg = "Length of data.x and data.y must be equal"
             msg += " and greater than 1; got x=%s, y=%s" % (len(data.x), len(data.y))
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             #Create error for data without dy error
@@ -742,14 +742,14 @@
         range = range.lower()
         if range not in ['high', 'low']:
-            raise ValueError, "Extrapolation range should be 'high' or 'low'"
+            raise ValueError("Extrapolation range should be 'high' or 'low'")
         function = function.lower()
         if function not in ['power_law', 'guinier']:
             msg = "Extrapolation function should be 'guinier' or 'power_law'"
-            raise ValueError, msg
+            raise ValueError(msg)
 
         if range == 'high':
             if function != 'power_law':
                 msg = "Extrapolation only allows a power law at high Q"
-                raise ValueError, msg
+                raise ValueError(msg)
             self._high_extrapolation_npts = npts
             self._high_extrapolation_power = power
@@ -852,5 +852,5 @@
         """
         if contrast <= 0:
-            raise ValueError, "The contrast parameter must be greater than zero"
+            raise ValueError("The contrast parameter must be greater than zero")
 
         # Make sure Q star is up to date
@@ -859,5 +859,5 @@
         if self._qstar <= 0:
             msg = "Invalid invariant: Invariant Q* must be greater than zero"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         # Compute intermediate constant
@@ -869,5 +869,5 @@
         if discrim < 0:
             msg = "Could not compute the volume fraction: negative discriminant"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         elif discrim == 0:
             return 1 / 2
@@ -881,5 +881,5 @@
                 return volume2
             msg = "Could not compute the volume fraction: inconsistent results"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
     def get_qstar_with_error(self, extrapolation=None):
Index: src/sas/sascalc/pr/fit/AbstractFitEngine.py
===================================================================
--- src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sascalc/pr/fit/AbstractFitEngine.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -250,5 +250,5 @@
             msg = "FitData1D: invalid error array "
             msg += "%d <> %d" % (np.shape(self.dy), np.size(fx))
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         return (self.y[self.idx] - fx[self.idx]) / self.dy[self.idx], fx[self.idx]
             
Index: src/sas/sascalc/pr/fit/Loader.py
===================================================================
--- src/sas/sascalc/pr/fit/Loader.py	(revision ac07a3acc20dbf79c564bf642aece71a02c2c862)
+++ src/sas/sascalc/pr/fit/Loader.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -57,7 +57,7 @@
             # Sanity check
             if not len(self.x) == len(self.dx):
-                raise ValueError, "x and dx have different length"
+                raise ValueError("x and dx have different length")
             if not len(self.y) == len(self.dy):
-                raise ValueError, "y and dy have different length"
+                raise ValueError("y and dy have different length")
             
             
Index: src/sas/sascalc/pr/fit/expression.py
===================================================================
--- src/sas/sascalc/pr/fit/expression.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sascalc/pr/fit/expression.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -237,5 +237,5 @@
         if independent == emptyset:
             cycleset = ", ".join(str(s) for s in left)
-            raise ValueError,"Cyclic dependencies amongst %s"%cycleset
+            raise ValueError("Cyclic dependencies amongst %s"%cycleset)
 
         # The possibly resolvable items are those that depend on the independents
@@ -265,8 +265,8 @@
         n.sort()
         items = list(items); items.sort()
-        raise Exception,"%s expect %s to contain %s for %s"%(msg,n,items,pairs)
+        raise Exception("%s expect %s to contain %s for %s"%(msg,n,items,pairs))
     for lo,hi in pairs:
         if lo in n and hi in n and n.index(lo) >= n.index(hi):
-            raise Exception,"%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs)
+            raise Exception("%s expect %s before %s in %s for %s"%(msg,lo,hi,n,pairs))
 
 def test_deps():
@@ -288,5 +288,5 @@
     try: n = order_dependencies(pairs)
     except ValueError: pass
-    else: raise Exception,"test3 expect ValueError exception for %s"%(pairs,)
+    else: raise Exception("test3 expect ValueError exception for %s"%(pairs,))
 
     # large test for gross speed check
Index: src/sas/sascalc/pr/invertor.py
===================================================================
--- src/sas/sascalc/pr/invertor.py	(revision 45dffa69cb5935e2da7c77a2f040debb07ceb1c6)
+++ src/sas/sascalc/pr/invertor.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -148,5 +148,5 @@
                 msg = "Invertor: one of your q-values is zero. "
                 msg += "Delete that entry before proceeding"
-                raise ValueError, msg
+                raise ValueError(msg)
             return self.set_x(value)
         elif name == 'y':
@@ -159,5 +159,5 @@
                 msg = "Invertor: d_max must be greater than zero."
                 msg += "Correct that entry before proceeding"
-                raise ValueError, msg
+                raise ValueError(msg)
             return self.set_dmax(value)
         elif name == 'q_min':
@@ -181,5 +181,5 @@
                 return self.set_has_bck(0)
             else:
-                raise ValueError, "Invertor: has_bck can only be True or False"
+                raise ValueError("Invertor: has_bck can only be True or False")
 
         return Cinvertor.__setattr__(self, name, value)
@@ -325,5 +325,5 @@
         if self.is_valid() <= 0:
             msg = "Invertor.invert: Data array are of different length"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         p = np.ones(nfunc)
@@ -358,5 +358,5 @@
         if self.is_valid() <= 0:
             msg = "Invertor.invert: Data arrays are of different length"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         p = np.ones(nfunc)
@@ -442,5 +442,5 @@
         if self.is_valid() < 0:
             msg = "Invertor: invalid data; incompatible data lengths."
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         self.nfunc = nfunc
@@ -467,5 +467,5 @@
             self._get_matrix(nfunc, nq, a, b)
         except:
-            raise RuntimeError, "Invertor: could not invert I(Q)\n  %s" % sys.exc_value
+            raise RuntimeError("Invertor: could not invert I(Q)\n  %s" % sys.exc_value)
 
         # Perform the inversion (least square fit)
@@ -751,6 +751,6 @@
             except:
                 msg = "Invertor.from_file: corrupted file\n%s" % sys.exc_value
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
         else:
             msg = "Invertor.from_file: '%s' is not a file" % str(path)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
Index: src/sas/sasgui/guiframe/data_processor.py
===================================================================
--- src/sas/sasgui/guiframe/data_processor.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/data_processor.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -907,5 +907,5 @@
                     msg = "Edit axis doesn't understand this selection.\n"
                     msg += "Please select only one column"
-                    raise ValueError, msg
+                    raise ValueError(msg)
             for (_, cell_col) in grid.selected_cells:
                 if cell_col != col:
@@ -913,5 +913,5 @@
                     msg += "this operation.\n"
                     msg += "Please select elements of the same col.\n"
-                    raise ValueError, msg
+                    raise ValueError(msg)
 
             # Finally check the highlighted cell if any cells missing
@@ -920,5 +920,5 @@
             msg = "No item selected.\n"
             msg += "Please select only one column or one cell"
-            raise ValueError, msg
+            raise ValueError(msg)
         return grid.selected_cells
 
@@ -1324,5 +1324,5 @@
             if sentence.strip() == "":
                 msg = "Select column values for x axis"
-                raise ValueError, msg
+                raise ValueError(msg)
         except:
             msg = "X axis value error."
@@ -1343,5 +1343,5 @@
             if sentence.strip() == "":
                 msg = "select value for y axis"
-                raise ValueError, msg
+                raise ValueError(msg)
         except:
             msg = "Y axis value error."
Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 2f22db96dce134a5ac8f4dba0b22c4df370c5431)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -2613,5 +2613,5 @@
             wx.PostEvent(self, StatusEvent(status=msg,
                                            info="error"))
-            raise ValueError, msg
+            raise ValueError(msg)
         # text = str(data)
         text = data.__str__()
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -235,5 +235,5 @@
             msg = "Phi left and phi right are different"
             msg += " %f, %f" % (self.left_line.phi, self.right_line.phi)
-            raise ValueError, msg
+            raise ValueError(msg)
         params["Phi [deg]"] = self.main_line.theta * 180 / math.pi
         params["Delta_Phi [deg]"] = math.fabs(self.left_line.phi * 180 / math.pi)
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -187,6 +187,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
         self._actions[trigger][artist] = action
@@ -203,5 +203,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
         for mod in ('alt', 'control', 'shift', 'meta'):
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -152,5 +152,5 @@
             if new_slab is None:
                 msg = "post data:cannot average , averager is empty"
-                raise ValueError, msg
+                raise ValueError(msg)
             self.averager = new_slab
         if self.direction == "X":
@@ -168,5 +168,5 @@
         else:
             msg = "post data:no Box Average direction was supplied"
-            raise ValueError, msg
+            raise ValueError(msg)
         # # Average data2D given Qx or Qy
         box = self.averager(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max,
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py	(revision 235f514ba93b57fa63e44309f182acef0b98bb55)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -199,5 +199,5 @@
 
         msg = "1D Panel of group ID %s could not be created" % str(group_id)
-        raise ValueError, msg
+        raise ValueError(msg)
 
     def create_2d_panel(self, data, group_id):
@@ -217,5 +217,5 @@
             return new_panel
         msg = "2D Panel of group ID %s could not be created" % str(group_id)
-        raise ValueError, msg
+        raise ValueError(msg)
 
     def update_panel(self, data, panel):
@@ -237,5 +237,5 @@
             msg += " to panel %s\n" % str(panel.window_caption)
             msg += "Please edit %s's units, labels" % str(data.name)
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             if panel.group_id not in data.list_group_id:
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -175,5 +175,5 @@
             msg += "different %f, %f" % (self.left_line.phi,
                                          self.right_line.phi)
-            raise ValueError, msg
+            raise ValueError(msg)
         params["Phi"] = self.main_line.theta
         params["Delta_Phi"] = math.fabs(self.left_line.phi)
Index: src/sas/sasgui/guiframe/plugin_base.py
===================================================================
--- src/sas/sasgui/guiframe/plugin_base.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/plugin_base.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -277,5 +277,5 @@
         """
         msg = "%s plugin: does not support import theory" % str(self.sub_menu)
-        raise ValueError, msg
+        raise ValueError(msg)
 
     def on_set_state_helper(self, event):
Index: src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/resolution_calculator_panel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -1082,5 +1082,5 @@
                 msg = "The numbers must be one or two (separated by ',')..."
                 self._status_info(msg, 'stop')
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
 
         return new_string
Index: src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/calculator/slit_length_calculator_panel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -262,5 +262,5 @@
             if x == [] or  x is None or y == [] or y is None:
                 msg = "The current data is empty please check x and y"
-                raise ValueError, msg
+                raise ValueError(msg)
             slit_length_calculator = SlitlengthCalculator()
             slit_length_calculator.set_data(x=x, y=y)
Index: src/sas/sasgui/perspectives/corfunc/corfunc_state.py
===================================================================
--- src/sas/sasgui/perspectives/corfunc/corfunc_state.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/corfunc/corfunc_state.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -284,5 +284,5 @@
             root, ext = os.path.splitext(basename)
             if not ext.lower() in self.ext:
-                raise IOError, "{} is not a supported file type".format(ext)
+                raise IOError("{} is not a supported file type".format(ext))
             tree = etree.parse(path, parser=etree.ETCompatXMLParser())
             root = tree.getroot()
@@ -300,5 +300,5 @@
             # File not found
             msg = "{} is not a valid file path or doesn't exist".format(path)
-            raise IOError, msg
+            raise IOError(msg)
 
         if len(output) == 0:
@@ -324,5 +324,5 @@
             msg = ("The CanSAS writer expects a Data1D instance. {} was "
                 "provided").format(datainfo.__class__.__name__)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         if datainfo.title is None or datainfo.title == '':
             datainfo.title = datainfo.name
Index: src/sas/sasgui/perspectives/fitting/fit_thread.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fit_thread.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/fitting/fit_thread.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -54,5 +54,5 @@
         except KeyboardInterrupt:
             msg = "Fitting: terminated by the user."
-            raise KeyboardInterrupt, msg
+            raise KeyboardInterrupt(msg)
 
     def compute(self):
Index: src/sas/sasgui/perspectives/fitting/fitpage.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpage.py	(revision 9a5097cd1c76689d1f997b85ba43d12a95d8f243)
+++ src/sas/sasgui/perspectives/fitting/fitpage.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -1847,5 +1847,5 @@
                     wx.PostEvent(self._manager.parent, StatusEvent(status=msg,
                                                info="error"))
-                    raise ValueError, msg
+                    raise ValueError(msg)
 
             else:
@@ -1859,5 +1859,5 @@
                     wx.PostEvent(self._manager.parent, StatusEvent(status=msg,
                                                info="error"))
-                    raise ValueError, msg
+                    raise ValueError(msg)
                 # Maximum value of data
                 qmax = math.sqrt(x * x + y * y)
@@ -2098,5 +2098,5 @@
         self._on_fit_complete()
         if out is None or not np.isfinite(chisqr):
-            raise ValueError, "Fit error occured..."
+            raise ValueError("Fit error occured...")
 
         is_modified = False
@@ -2173,5 +2173,5 @@
                 i += 1
             else:
-                raise ValueError, "onsetValues: Invalid parameters..."
+                raise ValueError("onsetValues: Invalid parameters...")
         # Show error title when any errors displayed
         if has_error:
Index: src/sas/sasgui/perspectives/fitting/fitpanel.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitpanel.py	(revision 67b0a99ce9f69a9dfef035e8e4a06588c9f1602f)
+++ src/sas/sasgui/perspectives/fitting/fitpanel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -125,5 +125,5 @@
         if uid not in self.opened_pages:
             msg = "Fitpanel cannot find ID: %s in self.opened_pages" % str(uid)
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             return self.opened_pages[uid]
@@ -389,5 +389,5 @@
         """
         if data.__class__.__name__ != "list":
-            raise ValueError, "Fitpanel delete_data expect list of id"
+            raise ValueError("Fitpanel delete_data expect list of id")
         else:
             for page in self.opened_pages.values():
Index: src/sas/sasgui/perspectives/fitting/fitting.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/fitting.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/fitting/fitting.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -1232,5 +1232,5 @@
         panel = self.plot_panel
         if panel is None:
-            raise ValueError, "Fitting:_onSelect: NonType panel"
+            raise ValueError("Fitting:_onSelect: NonType panel")
         Plugin.on_perspective(self, event=event)
         self.select_data(panel)
Index: src/sas/sasgui/perspectives/fitting/model_thread.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/model_thread.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/fitting/model_thread.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -65,5 +65,5 @@
         if self.data is None:
             msg = "Compute Calc2D receive data = %s.\n" % str(self.data)
-            raise ValueError, msg
+            raise ValueError(msg)
 
         # Define matrix where data will be plotted
Index: src/sas/sasgui/perspectives/fitting/models.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/models.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/perspectives/fitting/models.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -142,5 +142,5 @@
         if type is not None and issubclass(type, py_compile.PyCompileError):
             print "Problem with", repr(value)
-            raise type, value, tb
+            raise type(value).with_traceback(tb)
         return 1
 
Index: src/sas/sasgui/perspectives/fitting/pagestate.py
===================================================================
--- src/sas/sasgui/perspectives/fitting/pagestate.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/fitting/pagestate.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -1014,5 +1014,5 @@
             msg = "PageState no longer supports non-CanSAS"
             msg += " format for fitting files"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if node.get('version'):
@@ -1310,5 +1310,5 @@
             else:
                 self.call_back(format=ext)
-                raise RuntimeError, "%s is not a file" % path
+                raise RuntimeError("%s is not a file" % path)
 
             # Return output consistent with the loader's api
Index: src/sas/sasgui/perspectives/invariant/invariant.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/invariant/invariant.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -133,5 +133,5 @@
             name = data.__class__.__name__
             msg = "Invariant use only Data1D got: [%s] " % str(name)
-            raise ValueError, msg
+            raise ValueError(msg)
         self.compute_helper(data=data)
 
@@ -240,5 +240,5 @@
             msg = "invariant.save_file: the data being saved is"
             msg += " not a sas.sascalc.dataloader.data_info.Data1D object"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
     def set_state(self, state=None, datainfo=None):
@@ -258,5 +258,5 @@
                 msg = "invariant.set_state: datainfo parameter cannot"
                 msg += " be None in standalone mode"
-                raise RuntimeError, msg
+                raise RuntimeError(msg)
             # Make sure the user sees the invariant panel after loading
             # self.parent.set_perspective(self.perspective)
@@ -320,5 +320,5 @@
         else:
             msg = "Scale can not be zero."
-            raise ValueError, msg
+            raise ValueError(msg)
         if len(new_plot.x) == 0:
             return
Index: src/sas/sasgui/perspectives/invariant/invariant_panel.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/invariant/invariant_panel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -318,10 +318,10 @@
         background = self.background_tcl.GetValue().lstrip().rstrip()
         if background == "":
-            raise ValueError, "Need a background"
+            raise ValueError("Need a background")
         if check_float(self.background_tcl):
             return float(background)
         else:
             msg = "Receive invalid value for background : %s" % (background)
-            raise ValueError, msg
+            raise ValueError(msg)
 
     def get_scale(self):
@@ -331,5 +331,5 @@
         scale = self.scale_tcl.GetValue().lstrip().rstrip()
         if scale == "":
-            raise ValueError, "Need a background"
+            raise ValueError("Need a background")
         if check_float(self.scale_tcl):
             if float(scale) <= 0.0:
@@ -337,8 +337,8 @@
                 self.scale_tcl.Refresh()
                 msg = "Receive invalid value for scale: %s" % (scale)
-                raise ValueError, msg
+                raise ValueError(msg)
             return float(scale)
         else:
-            raise ValueError, "Receive invalid value for scale : %s" % (scale)
+            raise ValueError("Receive invalid value for scale : %s" % (scale))
 
     def get_contrast(self):
@@ -865,5 +865,5 @@
         except:
             logger.error(sys.exc_value)
-            raise ValueError, "No such bookmark exists"
+            raise ValueError("No such bookmark exists")
 
         # set the parameters
Index: src/sas/sasgui/perspectives/invariant/invariant_state.py
===================================================================
--- src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/invariant/invariant_state.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -365,5 +365,5 @@
             msg = "InvariantSate no longer supports non-CanSAS"
             msg += " format for invariant files"
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
 
         if node.get('version')\
@@ -739,5 +739,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
@@ -785,5 +785,5 @@
             msg = "The cansas writer expects a Data1D"
             msg += " instance: %s" % str(datainfo.__class__.__name__)
-            raise RuntimeError, msg
+            raise RuntimeError(msg)
         # make sure title and data run is filled up.
         if datainfo.title is None or datainfo.title == '':
Index: src/sas/sasgui/perspectives/pr/inversion_panel.py
===================================================================
--- src/sas/sasgui/perspectives/pr/inversion_panel.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/pr/inversion_panel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -854,5 +854,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()
Index: src/sas/sasgui/perspectives/pr/inversion_state.py
===================================================================
--- src/sas/sasgui/perspectives/pr/inversion_state.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/pr/inversion_state.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -235,5 +235,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':
@@ -478,5 +478,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
@@ -522,5 +522,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 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/perspectives/pr/pr.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -149,5 +149,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
@@ -450,5 +450,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
@@ -470,5 +470,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
@@ -849,9 +849,9 @@
                 status = "Problem reading data: %s" % sys.exc_value
                 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
@@ -903,5 +903,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,
Index: src/sas/sasgui/perspectives/simulation/ShapeAdapter.py
===================================================================
--- src/sas/sasgui/perspectives/simulation/ShapeAdapter.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/simulation/ShapeAdapter.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -87,5 +87,5 @@
             self.sim_canvas._model_changed()
         else:
-            raise ValueError, "SimShapeVisitor: Wrong class for visited object"
+            raise ValueError("SimShapeVisitor: Wrong class for visited object")
         
         
@@ -115,5 +115,5 @@
             self.sim_canvas._model_changed()
         else:
-            raise ValueError, "SimShapeVisitor: Wrong class for visited object"
+            raise ValueError("SimShapeVisitor: Wrong class for visited object")
         
     
@@ -130,4 +130,4 @@
             shape.accept_update(self)
         else:
-            raise ValueError, "ShapeAdapter: Shape [%s] not in list" % shape.name
+            raise ValueError("ShapeAdapter: Shape [%s] not in list" % shape.name)
 
Index: src/sas/sasgui/plottools/LineModel.py
===================================================================
--- src/sas/sasgui/plottools/LineModel.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/plottools/LineModel.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -82,5 +82,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)
@@ -104,5 +104,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/binder.py
===================================================================
--- src/sas/sasgui/plottools/binder.py	(revision 463e7ffce130ae386f93cd18b87a1120743e88b5)
+++ src/sas/sasgui/plottools/binder.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -187,6 +187,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
@@ -203,5 +203,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/convert_units.py
===================================================================
--- src/sas/sasgui/plottools/convert_units.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/plottools/convert_units.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -42,10 +42,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 b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -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/plottables.py
===================================================================
--- src/sas/sasgui/plottools/plottables.py	(revision 45dffa69cb5935e2da7c77a2f040debb07ceb1c6)
+++ src/sas/sasgui/plottools/plottables.py	(revision b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -386,5 +386,5 @@
 
         """
-        raise NotImplemented, "Not a valid transform"
+        raise NotImplemented("Not a valid transform")
 
     # Related issues
@@ -686,15 +686,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 = []
@@ -731,13 +731,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
@@ -1105,5 +1105,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 b9d74f32350ed1eab5cbfd89e0bb414178a1615d)
@@ -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
