Index: /trunk/anuga_core/source/anuga/__init__.py
===================================================================
--- /trunk/anuga_core/source/anuga/__init__.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/__init__.py	(revision 8124)
@@ -249,5 +249,5 @@
             msg = 'Caching was requested, but caching module'+\
                   'could not be imported'
-            raise msg
+            raise (msg)
 
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/ermapper_grids.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/ermapper_grids.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/ermapper_grids.py	(revision 8124)
@@ -176,5 +176,5 @@
     #    else:
     #        msg = 'Format %s is not yet defined by celltype_map' %data_format
-    #        raise msg
+    #        raise Exception(msg)
         
     
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/file_function.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/file_function.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/file_function.py	(revision 8124)
@@ -215,5 +215,5 @@
         # suggestion about reading hydrographs.
         # This may also deal with the gist of ticket:289 
-        raise 'Must be a NetCDF File'
+        raise Exception('Must be a NetCDF File')
 
 
@@ -271,5 +271,5 @@
     if quantity_names is None or len(quantity_names) < 1:
         msg = 'No quantities are specified in file_function'
-        raise Exception, msg
+        raise Exception(msg)
  
     if interpolation_points is not None:
@@ -289,5 +289,5 @@
               % (str(missing), filename)
         fid.close()
-        raise Exception, msg
+        raise Exception(msg)
 
     # Decide whether this data has a spatial dimension
@@ -298,14 +298,14 @@
 
     if filename[-3:] == 'tms' and spatial is True:
-        msg = 'Files of type tms must not contain spatial  information'
+        msg = 'Files of type TMS must not contain spatial information'
         raise Exception(msg)
 
     if filename[-3:] == 'sww' and spatial is False:
-        msg = 'Files of type sww must contain spatial information'        
+        msg = 'Files of type SWW must contain spatial information'        
         raise Exception(msg)
 
     if filename[-3:] == 'sts' and spatial is False:
         #What if mux file only contains one point
-        msg = 'Files of type sts must contain spatial information'        
+        msg = 'Files of type STS must contain spatial information'        
         raise Exception(msg)
 
@@ -414,9 +414,9 @@
                != len(temp)-1:
                 msg='incorrect number of segments'
-                raise msg
+                raise Exception(msg)
             vertex_coordinates=ensure_numeric(temp)
             if len(vertex_coordinates)==0:
                 msg = 'None of the sts gauges fall on the boundary'
-                raise msg
+                raise Exception(msg)
         else:
             gauge_neighbour_id=None
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/gauge.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/gauge.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/gauge.py	(revision 8124)
@@ -156,5 +156,5 @@
     except Exception, e:
         msg = 'File "%s" could not be opened: Error="%s"' % (gauge_file, e)
-        raise msg
+        raise Exception(msg)
 
     if verbose: log.critical('Gauges obtained from: %s' % gauge_file)
@@ -193,5 +193,5 @@
     else:
         msg = 'File "%s" could not be opened: no read permission' % sww_file
-        raise msg
+        raise Exception(msg)
 
     sww_files = get_all_swwfiles(look_in_dir=dir_name,
@@ -453,5 +453,5 @@
     except Exception, e:
         msg = 'File "%s" could not be opened: Error="%s"' % (gauge_filename, e)
-        raise msg
+        raise Exception(msg)
 
     if report is None:
@@ -491,5 +491,5 @@
         except Exception, e:
             msg = 'File "%s" could not be opened: Error="%s"' % (swwfile, e)
-            raise msg
+            raise Exception(msg)
 
         if verbose:
@@ -543,5 +543,5 @@
         if time_min < theminT: # min(T):
             msg = 'Minimum time entered not correct - please try again'
-            raise Exception, msg
+            raise Exception(msg)
 
     if time_max is None:
@@ -550,5 +550,5 @@
         if time_max > themaxT: # max(T):
             msg = 'Maximum time entered not correct - please try again'
-            raise Exception, msg
+            raise Exception(msg)
 
     if verbose and len(gauge_index) > 0:
@@ -611,5 +611,5 @@
                   % filename
             msg += 'The header must be: easting, northing, name, elevation'
-            raise Exception, msg
+            raise Exception(msg)
 
         if elev_index is None: 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_boundary_conditions.py	(revision 8124)
@@ -26,5 +26,5 @@
     def evaluate(self, vol_id=None, edge_id=None):
         msg = 'Generic class Boundary must be subclassed'
-        raise Exception, msg
+        raise Exception(msg)
 
 
@@ -41,5 +41,5 @@
         if domain is None:
             msg = 'Domain must be specified for transmissive boundary'
-            raise Exception, msg
+            raise Exception(msg)
 
         self.domain = domain
@@ -73,5 +73,5 @@
         if conserved_quantities is None:
             msg = 'Must specify one value for each conserved quantity'
-            raise Exception, msg
+            raise Exception(msg)
 
         self.conserved_quantities=num.array(conserved_quantities, num.float)
@@ -116,12 +116,12 @@
 
         if domain is None:
-            raise Exception, 'You must specify a domain to Time_boundary'
+            raise Exception('You must specify a domain to Time_boundary')
 
         # FIXME: Temporary code to deal with both f and function
         if function is not None and f is not None:
-            raise Exception, 'Specify either function or f to Time_boundary'
+            raise Exception('Specify either function or f to Time_boundary')
             
         if function is None and f is None:
-            raise Exception, 'You must specify a function to Time_boundary'
+            raise Exception('You must specify a function to Time_boundary')
             
         if f is None:
@@ -133,5 +133,5 @@
         except Exception, e:
             msg = 'Function for time boundary could not be executed:\n%s' %e
-            raise msg
+            raise Exception(msg)
 
 
@@ -143,5 +143,5 @@
             msg += 'Specified function should return either list or array.\n'
             msg += 'I got %s' %str(q)
-            raise msg
+            raise Exception(msg)
 
         msg = 'ERROR: Time boundary function must return a 1d list or array '
@@ -163,8 +163,8 @@
             res = self.f(self.domain.time)
         except Modeltime_too_early, e:
-            raise Modeltime_too_early, e
+            raise Modeltime_too_early(e)
         except Modeltime_too_late, e:
             if self.default_boundary is None:
-                raise Exception, e # Reraise exception
+                raise Exception(e) # Reraise exception
             else:
                 # Pass control to default boundary
@@ -223,5 +223,5 @@
         
         if function is None:
-            raise Exception, 'You must specify a function to Time_space_boundary'
+            raise Exception('You must specify a function to Time_space_boundary')
             
         try:
@@ -229,5 +229,5 @@
         except Exception, e:
             msg = 'Function for time_space_boundary could not be executed:\n%s' %e
-            raise msg
+            raise Exception(msg)
 
 
@@ -239,5 +239,5 @@
             msg += 'Specified function should return either list or array.\n'
             msg += 'I got %s' %str(q)
-            raise msg
+            raise Exception(msg)
 
         msg = 'ERROR: Time_space_boundary function must return a 1d list or array '
@@ -262,8 +262,8 @@
             res = self.function(self.domain.get_time(), x, y)
         except Modeltime_too_early, e:
-            raise Modeltime_too_early, e
+            raise Modeltime_too_early(e)
         except Modeltime_too_late, e:
             if self.default_boundary is None:
-                raise Exception, e # Reraise exception
+                raise Exception(e) # Reraise exception
             else:
                 # Pass control to default boundary
@@ -437,8 +437,8 @@
                 res = self.F(t, point_id=i)
             except Modeltime_too_early, e:
-                raise Modeltime_too_early, e
+                raise Modeltime_too_early(e)
             except Modeltime_too_late, e:
                 if self.default_boundary is None:
-                    raise Exception, e # Reraise exception
+                    raise Exception(e) # Reraise exception
                 else:
                     # Pass control to default boundary
@@ -486,5 +486,5 @@
                         msg += 'the file %s.\n' %self.F.filename
                         msg += 'Check this file for NANs.'
-                raise Exception, msg
+                raise Exception(msg)
             
             return res 
@@ -492,5 +492,5 @@
             msg = 'Boundary call without point_id not implemented.\n'
             msg += 'vol_id=%s, edge_id=%s' %(str(vol_id), str(edge_id))
-            raise Exception, msg
+            raise Exception(msg)
 
 class AWI_boundary(Boundary):
@@ -641,5 +641,5 @@
                         msg += 'the file %s.\n' % self.F.filename
                         msg += 'Check this file for NANs.'
-                raise Exception, msg
+                raise Exception(msg)
             
             q[0] = res[0] # Take stage, leave momentum alone
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/generic_domain.py	(revision 8124)
@@ -413,5 +413,5 @@
             msg = 'Values for both vertex and edge was specified.'
             msg += 'Only one (or none) is allowed.'
-            raise Exception, msg
+            raise Exception(msg)
 
         q = num.zeros(len(self.conserved_quantities), num.float)
@@ -452,5 +452,5 @@
             msg = 'Values for both vertex and edge was specified.'
             msg += 'Only one (or none) is allowed.'
-            raise Exception, msg
+            raise Exception(msg)
 
         q = num.zeros(len(self.evolved_quantities), num.float)
@@ -828,5 +828,5 @@
                 msg += 'in set_boundary.\n'
                 msg += 'The tags are: %s' %self.get_boundary_tags()
-                raise Exception, msg
+                raise Exception(msg)
 
     ##
@@ -942,5 +942,5 @@
 
                 if polygon in self.quantities:
-                    raise Exception, msg
+                    raise Exception(msg)
 
                 try:
@@ -950,10 +950,10 @@
                     pass
                 else:
-                    raise Exception, msg
+                    raise Exception(msg)
 
                 # In any case, we don't allow polygon to be a string
                 msg = ('argument "polygon" must not be a string: '
                        'I got polygon="%s"') % polygon
-                raise Exception, msg
+                raise Exception(msg)
 
             # Get indices for centroids that are inside polygon
@@ -1330,5 +1330,5 @@
 
         msg = '%s is an incorrect timestepping type' % timestepping_method
-        raise Exception, msg
+        raise Exception(msg)
 
     ##
@@ -1444,5 +1444,5 @@
         if finaltime is not None and duration is not None:
             msg = 'Only one of finaltime and duration may be specified'
-            raise Exception, msg
+            raise Exception(msg)
         else:
             if finaltime is not None:
@@ -1531,5 +1531,5 @@
                     # Now changed to Exception.
                     msg = ('WARNING (domain.py): time overshot finaltime. ')
-                    raise Exception, msg
+                    raise Exception(msg)
 
                 # Log and then Yield final time and stop
@@ -1808,5 +1808,5 @@
             msg = 'Method conserved_values_to_evolved_values must be overridden'
             msg += ' by Domain subclass'
-            raise Exception, msg
+            raise Exception(msg)
 
         return q_evol
@@ -1846,5 +1846,5 @@
                     msg = 'Boundary must return array of either conserved'
                     msg += ' or evolved quantities'
-                    raise Exception, msg
+                    raise Exception(msg)
                 
                 for j, name in enumerate(self.evolved_quantities):
@@ -1857,5 +1857,5 @@
     def compute_fluxes(self):
         msg = 'Method compute_fluxes must be overridden by Domain subclass'
-        raise Exception, msg
+        raise Exception(msg)
 
 
@@ -1936,5 +1936,5 @@
                     log.critical(stats)
 
-                    raise Exception, msg
+                    raise Exception(msg)
                 else:
                     # Try to overcome situation by switching to 1 order
@@ -2033,5 +2033,5 @@
                 Q.extrapolate_second_order()
             else:
-                raise Exception, 'Unknown order'
+                raise Exception('Unknown order: %s' % str(self._order_))
 
     ##
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/mesh_factory.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/mesh_factory.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/mesh_factory.py	(revision 8124)
@@ -685,5 +685,5 @@
                               int(float(fields[2]))-1])
         else:
-            raise 'wrong format in ' + filename
+            raise Excetion('wrong format in %s' % filename)
 
     elements = [] #Final list of elements
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/neighbour_mesh.py	(revision 8124)
@@ -262,11 +262,11 @@
             if neighbourdict.has_key((a,b)):
                     msg = "Edge 2 of triangle %d is duplicating edge %d of triangle %d.\n" %(i,neighbourdict[a,b][1],neighbourdict[a,b][0])
-                    raise Exception, msg
+                    raise Exception(msg)
             if neighbourdict.has_key((b,c)):
                     msg = "Edge 0 of triangle %d is duplicating edge %d of triangle %d.\n" %(i,neighbourdict[b,c][1],neighbourdict[b,c][0])
-                    raise msg
+                    raise Exception(msg)
             if neighbourdict.has_key((c,a)):
                     msg = "Edge 1 of triangle %d is duplicating edge %d of triangle %d.\n" %(i,neighbourdict[c,a][1],neighbourdict[c,a][0])
-                    raise msg
+                    raise Exception(msg)
 
             neighbourdict[a,b] = (i, 2) #(id, edge)
@@ -427,5 +427,5 @@
             msg = 'Boundary dictionary must be defined before '
             msg += 'building boundary structure'
-            raise msg
+            raise Exception(msg)
 
 
@@ -505,5 +505,5 @@
             if p0 is None:
                 msg = 'Impossible: p0 is None!?'
-                raise Exception, msg
+                raise Exception(msg)
 
             # Register potential paths from A to B
@@ -876,5 +876,5 @@
         if is_outside_polygon(point, polygon):
             msg = 'Point %s is outside mesh' %str(point)
-            raise Exception, msg
+            raise Exception(msg)
 
 
@@ -889,5 +889,5 @@
 
         msg = 'Point %s not found within a triangle' %str(point)
-        raise Exception, msg
+        raise Exception(msg)
 
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/quantity.py	(revision 8124)
@@ -423,5 +423,5 @@
             if indices is not None:
                 msg = 'Only one of polygon and indices can be specified'
-                raise Exception, msg
+                raise Exception(msg)
 
             msg = 'With polygon selected, set_quantity must provide '
@@ -429,5 +429,5 @@
             msg += 'a constant.'
             if numeric is None:
-                raise Exception, msg
+                raise Exception(msg)
             else:
                 # Check that numeric is as constant
@@ -457,9 +457,9 @@
         if location == 'edges':
             msg = 'edges has been deprecated as valid location'
-            raise Exception, msg
+            raise Exception(msg)
 
         if location not in ['vertices', 'centroids', 'unique vertices']:
             msg = 'Invalid location: %s' % location
-            raise Exception, msg
+            raise Exception(msg)
 
         msg = 'Indices must be a list, array or None'
@@ -488,5 +488,5 @@
                     msg = ("Illegal type for variable 'numeric': %s"
                            % type(numeric))
-                    raise Exception, msg
+                    raise Exception(msg)
                 self.set_values_from_constant(numeric, location,
                                               indices, verbose)
@@ -513,5 +513,5 @@
                                       use_cache=use_cache)
         else:
-            raise Exception, "This can't happen :-)"
+            raise Exception("This can't happen :-)")
 
         # Update all locations in triangles
@@ -665,5 +665,5 @@
             else:
                 msg = 'Values array must be 1d or 2d'
-                raise Exception, msg
+                raise Exception(msg)
 
     ##
@@ -769,5 +769,5 @@
                         self.vertex_values[i, j] = values[3*i + j]
         else:
-            raise Exception, 'Not implemented: %s' % location
+            raise Exception('Not implemented: %s' % location)
 
     ##
@@ -802,5 +802,5 @@
             msg = ("set_values_from_points is only defined for "
                    "location='vertices'")
-            raise Exception, msg
+            raise Exception(msg)
 
         # Take care of georeferencing
@@ -848,5 +848,5 @@
         """Set quantity values from arbitray data points using fit_interpolate.fit"""
 
-        raise Exception, 'set_values_from_points is obsolete, use geospatial data object instead'
+        raise Exception('set_values_from_points is obsolete, use geospatial data object instead')
 
     ##
@@ -882,5 +882,5 @@
         if location != 'vertices':
             msg = "set_values_from_file is only defined for location='vertices'"
-            raise Exception, msg
+            raise Exception(msg)
 
             
@@ -951,5 +951,5 @@
             i = num.argmin(V)
         else:
-            raise ValueError, 'Bad mode value, got: %s' % str(mode)
+            raise ValueError('Bad mode value, got: %s' % str(mode))
 
         if indices is None:
@@ -1190,5 +1190,5 @@
                             'edges', 'unique vertices']:
             msg = 'Invalid location: %s' % location
-            raise Exception, msg
+            raise Exception(msg)
 
 
@@ -1218,5 +1218,5 @@
                 if len(triangles) == 0:
                     msg = 'Unique vertex not associated with triangles'
-                    raise Exception, msg
+                    raise Exception(msg)
 
                 # Go through all triangle, vertex pairs
@@ -1381,5 +1381,5 @@
                     if current_node == N:
                         msg = 'Current node exceeding number of nodes (%d) ' % N
-                        raise Exception, msg
+                        raise Exception(msg)
 
                     k += 1
@@ -1576,5 +1576,5 @@
     def __init__(self, domain, vertex_values=None):
         msg = 'ERROR: Use Quantity instead of Conserved_quantity'
-        raise Exception, msg
+        raise Exception(msg)
 
 
@@ -1611,3 +1611,3 @@
     msg += 'Make sure compile_all.py has been run as described in '
     msg += 'the ANUGA installation guide.'
-    raise Exception, msg
+    raise Exception(msg)
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/region.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/region.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/region.py	(revision 8124)
@@ -20,5 +20,5 @@
     def __call__(self, tag, elements, domain):
         msg = 'Generic class Boundary must be subclassed'
-        raise msg
+        raise Exception(msg)
 
 
@@ -86,5 +86,5 @@
             self.quantity_initial_value = initial_quantity
         if callable(X):
-            raise 'This class does not work with functions'  
+            raise Exception('This class does not work with functions')
 
     def __repr__(self):
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_generic_boundary_conditions.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_generic_boundary_conditions.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_generic_boundary_conditions.py	(revision 8124)
@@ -38,5 +38,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
 
@@ -48,5 +48,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
     def test_dirichlet(self):
@@ -95,5 +95,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
         #Test time bdry, you need to provide a function
@@ -103,5 +103,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
 
@@ -161,5 +161,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
         #Test time bdry, you need to provide a function
@@ -169,5 +169,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
 
@@ -233,5 +233,5 @@
             pass
         else:
-            raise 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
         T = Transmissive_boundary(domain)
@@ -424,5 +424,5 @@
             pass
         else:
-            raise 'Should have raised an exception'        
+            raise Exception('Should have raised an exception')
         
         os.remove(filename + '.txt')
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_neighbour_mesh.py	(revision 8124)
@@ -42,5 +42,5 @@
         else:
             msg = 'Should have raised exception'
-            raise msg
+            raise Exception(msg)
 
 
@@ -396,5 +396,5 @@
             pass
         else:
-            raise "triangle edge duplicates not caught"
+            raise Exception("triangle edge duplicates not caught")
 
 
@@ -652,5 +652,5 @@
             pass
         else:
-            raise 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
         #Too few points - 1 element
@@ -660,5 +660,5 @@
             pass
         else:
-            raise 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
         #Wrong dimension of vertices
@@ -668,5 +668,5 @@
             pass
         else:
-            raise 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
         #Unsubscriptable coordinates object raises exception
@@ -676,5 +676,5 @@
             pass
         else:
-            raise 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
         #FIXME: This has been commented out pending a decision
@@ -687,5 +687,5 @@
         #    pass
         #else:
-        #    raise 'Should have raised an exception'
+        #    raise Exception('Should have raised an exception')
 
         #Specifying wrong non existing segment
@@ -695,5 +695,5 @@
             pass
         else:
-            raise 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
 
@@ -1211,5 +1211,5 @@
         else:
             msg = 'Should have caught point outside polygon (Non)'            
-            raise Exception, msg
+            raise Exception(msg)
             
         id = mesh.get_triangle_containing_point([0.5, 1.0])
@@ -1268,5 +1268,5 @@
                 intersected_triangles = [2,3,6,7]
             else:
-                raise Exception, 'this test is not for parallel lines'
+                raise Exception('this test is not for parallel lines')
 
 
@@ -1761,6 +1761,6 @@
                     assert num.allclose(x.normal, [s2,-s2])
                 else:
-                    msg = 'Unknow segment: %s' %x.segment
-                    raise Exception, msg
+                    msg = 'Unknown segment: %s' %x.segment
+                    raise Exception(msg)
                 
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_quantity.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_quantity.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_quantity.py	(revision 8124)
@@ -75,5 +75,5 @@
             pass
         else:
-            raise 'Should have raised empty quantity exception'
+            raise Exception('Should have raised empty quantity exception')
 
 
@@ -84,5 +84,5 @@
         #    pass
         #except:
-        #    raise 'Should have raised "mising mesh object" error'
+        #    raise Exception('Should have raised "mising mesh object" error')
 
 
@@ -286,5 +286,5 @@
             pass
         except:
-            raise 'should have raised Assertionerror'
+            raise Exception('should have raised Assertionerror')
 
 
@@ -461,5 +461,5 @@
         else:
             msg = 'Should have caught this'
-            raise msg
+            raise Exception(msg)
 
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/test_util.py	(revision 8124)
@@ -166,5 +166,5 @@
             #if t == t0:
             #    msg = 'Duplicate timestep found: %f, %f' %(t0, t)
-            #   raise msg
+            #   raise Exception(msg)
             t0 = t
              
@@ -1269,5 +1269,5 @@
         else:
             msg = 'Should have raised a NameError Exception'
-            raise msg
+            raise Exception(msg)
 
 
@@ -1279,5 +1279,5 @@
         else:
             msg = 'Should have raised a AssertionError Exception'
-            raise msg        
+            raise Exception(msg)
         
 
Index: /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/util.py
===================================================================
--- /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/util.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/abstract_2d_finite_volumes/util.py	(revision 8124)
@@ -113,8 +113,8 @@
     except NameError, e:
         msg = 'Expression "%s" could not be evaluated: %s' % (expression, e)
-        raise NameError, msg
+        raise NameError(msg)
     except ValueError, e:
         msg = 'Expression "%s" could not be evaluated: %s' % (expression, e)
-        raise ValueError, msg
+        raise ValueError(msg)
 
 
@@ -146,5 +146,5 @@
                 return s
             else:
-                raise 'Illegal input to get_textual_float:', value
+                raise Exception('Illegal input to get_textual_float: %s' % str(value))
         else:
             return format % float(value)
@@ -177,6 +177,6 @@
     p = list(set(quantity).difference(set(all_quantity)))
     if len(p) != 0:
-        msg = 'Quantities %s do not exist - please try again' %p
-        raise Exception, msg
+        msg = 'Quantities %s do not exist - please try again' % p
+        raise Exception(msg)
 
 
@@ -340,5 +340,5 @@
     msg += 'Please use "from anuga.abstract_2d_finite_volumes.util import ' \
            'csv2timeseries_graphs"'
-    raise Exception, msg
+    raise Exception(msg)
 
     return csv2timeseries_graphs(directories_dic,
@@ -502,5 +502,5 @@
     except ImportError:
         msg='csv2timeseries_graphs needs pylab to be installed correctly'
-        raise msg
+        raise Exception(msg)
             #ANUGA don't need pylab to work so the system doesn't 
             #rely on pylab being installed 
Index: /trunk/anuga_core/source/anuga/advection/advection.py
===================================================================
--- /trunk/anuga_core/source/anuga/advection/advection.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/advection/advection.py	(revision 8124)
@@ -105,5 +105,5 @@
                 #Q.limit()
             else:
-                raise 'Unknown order'
+                raise Exception('Unknown order: %s' % str(self._order_))
             #Q.interpolate_from_vertices_to_edges()
 
Index: /trunk/anuga_core/source/anuga/caching/caching.py
===================================================================
--- /trunk/anuga_core/source/anuga/caching/caching.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/caching/caching.py	(revision 8124)
@@ -1049,5 +1049,5 @@
   if argsfile is None:
     msg = 'ERROR (caching): Could not open argsfile for writing: %s' %FN
-    raise IOError, msg
+    raise IOError(msg)
 
   mysave((args,kwargs),argsfile,compression)  # Save args and kwargs to cache
@@ -1289,5 +1289,5 @@
       msg = '****WARNING (caching.py): Could not pickle data for compression.'
       msg += ' Try using compression = False'
-      raise MemoryError, msg
+      raise MemoryError(msg)
     else:  
       # Compressed pickling      
@@ -1329,5 +1329,5 @@
       #  print e
       #  msg = 'Could not store to %s, bin=%s' %(file, bin)
-      #  raise msg 
+      #  raise Exception(msg)
       
 
@@ -1566,5 +1566,5 @@
       msg = 'Instance %s was passed into caching in the role of a function ' % str(my_F)
       msg = ' but it was not callable.'
-      raise Exception, msg
+      raise Exception(msg)
   elif type(my_F) in [types.BuiltinFunctionType, types.BuiltinMethodType]:      
     # Built-in functions are assumed not to change  
@@ -1576,5 +1576,5 @@
   else:
     msg = 'Unknown function type: %s' % type(my_F)
-    raise Exception, msg
+    raise Exception(msg)
 
 
@@ -1614,5 +1614,5 @@
       if expanded_FN == []:
         errmsg = 'ERROR (caching.py): Dependency '+FN+' does not exist.'
-        raise Exception, errmsg      
+        raise Exception(errmsg)
 
       expanded_dependencies += expanded_FN
@@ -1623,8 +1623,8 @@
         errmsg = 'ERROR (caching.py): Dependency must be a string.\n'
         errmsg += '                   Dependency given: %s' %FN
-        raise Exception, errmsg      
+        raise Exception(errmsg)
       if not os.access(FN,os.F_OK):
         errmsg = 'ERROR (caching.py): Dependency '+FN+' does not exist.'
-        raise Exception, errmsg
+        raise Exception(errmsg)
       (size,atime,mtime,ctime) = filestat(FN)
 
@@ -2107,5 +2107,5 @@
     if sortidx > len(rec)-1:
       msg = 'ERROR: Sorting index too large, sortidx = %s' % str(sortidx)
-      raise IndexError, msg
+      raise IndexError(msg)
 
     val = rec[sortidx]
Index: /trunk/anuga_core/source/anuga/caching/test_caching.py
===================================================================
--- /trunk/anuga_core/source/anuga/caching/test_caching.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/caching/test_caching.py	(revision 8124)
@@ -724,5 +724,5 @@
                     fid.close()
                 except:
-                    raise 'Statistics files cannot be opened'          
+                    raise Exception('Statistics files cannot be opened')
   
           
Index: /trunk/anuga_core/source/anuga/coordinate_transforms/geo_reference.py
===================================================================
--- /trunk/anuga_core/source/anuga/coordinate_transforms/geo_reference.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/coordinate_transforms/geo_reference.py	(revision 8124)
@@ -29,6 +29,4 @@
 
 
-##
-# @brief A class for ...
 class Geo_reference:
     """
@@ -46,17 +44,4 @@
     """
 
-    ##
-    # @brief Instantiate an instance of class Geo_reference.
-    # @param zone The UTM zone.
-    # @param xllcorner X coord of origin of georef.
-    # @param yllcorner Y coord of origin of georef.
-    # @param datum ??
-    # @param projection The projection used (default UTM).
-    # @param units Units used in measuring distance (default m).
-    # @param false_easting ??
-    # @param false_northing ??
-    # @param NetCDFObject NetCDF file *handle* to write to.
-    # @param ASCIIFile ASCII text file *handle* to write to.
-    # @param read_title Title of the georeference text.
     def __init__(self,
                  zone=DEFAULT_ZONE,
@@ -72,16 +57,24 @@
                  read_title=None):
         """
-        input:
-        NetCDFObject - a handle to the netCDF file to be written to
-        ASCIIFile - a handle to the text file
-        read_title - the title of the georeference text, if it was read in.
-         If the function that calls this has already read the title line,
-         it can't unread it, so this info has to be passed.
-         If you know of a way to unread this info, then tell us.
-
-         Note, the text file only saves a sub set of the info the
-         points file does.  Currently the info not written in text
-         must be the default info, since ANUGA assumes it isn't
-         changing.
+        zone            the UTM zone.
+        xllcorner       X coord of origin of georef.
+        yllcorner       Y coord of origin of georef.
+        datum           ??
+        projection      the projection used (default UTM).
+        units           units used in measuring distance (default m).
+        false_easting   ??
+        false_northing  ??
+        NetCDFObject    NetCDF file *handle* to write to.
+        ASCIIFile       ASCII text file *handle* to write to.
+        read_title      title of the georeference text.
+
+        If the function that calls this has already read the title line,
+        it can't unread it, so this info has to be passed.
+        If you know of a way to unread this info, then tell us.
+
+        Note, the text file only saves a sub set of the info the
+        points file does.  Currently the info not written in text
+        must be the default info, since ANUGA assumes it isn't
+        changing.
         """
 
@@ -110,18 +103,20 @@
         return self.xllcorner
 
-    ##
-    # @brief Get the Y coordinate of the origin of this georef.
     def get_yllcorner(self):
+        """Get the Y coordinate of the origin of this georef."""
+
         return self.yllcorner
 
-    ##
-    # @brief Get the zone of this georef.
     def get_zone(self):
+        """Get the zone of this georef."""
+
         return self.zone
 
-    ##
-    # @brief Write <something> to an open NetCDF file.
-    # @param outfile Handle to open NetCDF file.
     def write_NetCDF(self, outfile):
+        """Write georef attributes to an open NetCDF file.
+
+        outfile  handle to open NetCDF file
+        """
+
         outfile.xllcorner = self.xllcorner
         outfile.yllcorner = self.yllcorner
@@ -135,8 +130,10 @@
         outfile.units = self.units
 
-    ##
-    # @brief Read data from an open NetCDF file.
-    # @param infile Handle to open NetCDF file.
     def read_NetCDF(self, infile):
+        """Set georef attributes from open NetCDF file.
+
+        infile Handle to open NetCDF file
+        """
+
         self.xllcorner = float(infile.xllcorner[0])
         self.yllcorner = float(infile.yllcorner[0])
@@ -189,8 +186,10 @@
 ################################################################################
 
-    ##
-    # @brief Write georef data to an open text file.
-    # @param fd Handle to open text file.
     def write_ASCII(self, fd):
+        """Write georef attriutes to an open text file.
+
+        fd  handle to open text file
+        """
+
         fd.write(TITLE)
         fd.write(str(self.zone) + "\n")
@@ -198,8 +197,10 @@
         fd.write(str(self.yllcorner) + "\n")
 
-    ##
-    # @brief Read georef data from an open text file.
-    # @param fd Handle to open text file.
     def read_ASCII(self, fd, read_title=None):
+        """Set georef attribtes from open text file.
+
+        fd  handle to open text file
+        """
+
         try:
             if read_title == None:
@@ -232,15 +233,14 @@
 ################################################################################
 
-    ##
-    # @brief Change points to be absolute wrt new georef 'points_geo_ref'.
-    # @param points The points to change.
-    # @param points_geo_ref The new georef to make points absolute wrt.
-    # @return The changed points.
-    # @note If 'points' is a list then a changed list is returned.
     def change_points_geo_ref(self, points, points_geo_ref=None):
-        """Change the geo reference of a list or numeric array of points to
-        be this reference.(The reference used for this object)
-        If the points do not have a geo ref, assume 'absolute' values
-        """
+        """Change points to be absolute wrt new georef 'points_geo_ref'.
+
+        points          the points to change
+        points_geo_ref  the new georef to make points absolute wrt
+
+        Returns the changed points data.
+        If the points do not have a georef, assume 'absolute' values.
+        """
+
         import copy
        
@@ -285,6 +285,8 @@
 
     def is_absolute(self):
-        """Return True if xllcorner==yllcorner==0 indicating that points
-        in question are absolute.
+        """Test if points in georef are absolute.
+
+        Return True if xllcorner==yllcorner==0 indicating that points in
+        question are absolute.
         """
         
@@ -305,6 +307,6 @@
 
     def get_absolute(self, points):
-        """Given a set of points geo referenced to this instance,
-        return the points as absolute values.
+        """Given a set of points geo referenced to this instance, return the
+        points as absolute values.
         """
 
@@ -338,14 +340,12 @@
         return points
 
-    ##
-    # @brief Convert points to relative measurement.
-    # @param points Points to convert to relative measurements.
-    # @return A set of points relative to the geo_reference instance.
     def get_relative(self, points):
-        """Given a set of points in absolute UTM coordinates,
-        make them relative to this geo_reference instance,
-        return the points as relative values.
-
-        This is the inverse of get_absolute.
+        """Convert points to relative measurement.
+
+        points Points to convert to relative measurements
+
+        Returns a set of points relative to the geo_reference instance.
+
+        This is the inverse of get_absolute().
         """
 
@@ -376,7 +376,4 @@
         return points
 
-    ##
-    # @brief ??
-    # @param other ??
     def reconcile_zones(self, other):
         if other is None:
@@ -402,23 +399,24 @@
     #    return [x-self.xllcorner, y - self.xllcorner]
 
-    ##
-    # @brief Get origin of this geo_reference.
-    # @return (zone, xllcorner, yllcorner).
     def get_origin(self):
+        """Get origin of this geo_reference."""
+      
         return (self.zone, self.xllcorner, self.yllcorner)
 
-    ##
-    # @brief Get a string representation of this geo_reference instance.
     def __repr__(self):
         return ('(zone=%i easting=%f, northing=%f)'
                 % (self.zone, self.xllcorner, self.yllcorner))
 
-    ##
-    # @brief Compare two geo_reference instances.
-    # @param self This geo_reference instance.
-    # @param other Another geo_reference instance to compare against.
-    # @return 0 if instances have the same attributes, else 1.
-    # @note Attributes are: zone, xllcorner, yllcorner.
     def __cmp__(self, other):
+        """Compare two geo_reference instances.
+
+        self   this geo_reference instance
+        other  another geo_reference instance to compare against
+
+        Returns 0 if instances have the same attributes, else returns 1.
+
+        Note: attributes are: zone, xllcorner, yllcorner.
+        """
+
         # FIXME (DSG) add a tolerence
         if other is None:
@@ -434,15 +432,11 @@
 
 
-##
-# @brief Write a geo_reference to a NetCDF file (usually SWW).
-# @param origin A georef instance or parameters to create a georef instance.
-# @param outfile Path to file to write.
-# @return A normalized geo_reference.
 def write_NetCDF_georeference(origin, outfile):
-    """Write georeference info to a netcdf file, usually sww.
-
-    The origin can be a georef instance or parameters for a geo_ref instance
-
-    outfile is the name of the file to be written to.
+    """Write georeference info to a NetCDF file, usually a SWW file.
+
+    origin   a georef instance or parameters to create a georef instance
+    outfile  path to file to write
+
+    Returns the normalised georef.
     """
 
@@ -452,15 +446,11 @@
 
 
-##
-# @brief Convert an object to a georeference instance.
-# @param origin A georef instance or (zone, xllcorner, yllcorner)
-# @return A georef object, or None if 'origin' was None.
 def ensure_geo_reference(origin):
-    """
-    Given a list/tuple of zone, xllcorner and yllcorner of a geo-ref object,
-    return a geo ref object.
-
-    If the origin is None, return None, so calling this function doesn't
-    effect code logic
+    """Create a georef object from a tuple of attributes.
+
+    origin  a georef instance or (zone, xllcorner, yllcorner)
+
+    If origin is None, return None, so calling this function doesn't
+    effect code logic.
     """
 
Index: /trunk/anuga_core/source/anuga/coordinate_transforms/test_geo_reference.py
===================================================================
--- /trunk/anuga_core/source/anuga/coordinate_transforms/test_geo_reference.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/coordinate_transforms/test_geo_reference.py	(revision 8124)
@@ -473,5 +473,5 @@
         else:
             msg = 'Should have raised an exception'
-            raise msg
+            raise Exception(msg)
   
     def test_bad_ASCII_title(self):      
Index: /trunk/anuga_core/source/anuga/culvert_flows/culvert_class.py
===================================================================
--- /trunk/anuga_core/source/anuga/culvert_flows/culvert_class.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/culvert_flows/culvert_class.py	(revision 8124)
@@ -32,5 +32,5 @@
         x = float(x)
     except:
-        raise Exception, msg
+        raise Exception(msg)
 
 
@@ -39,10 +39,10 @@
         msg = 'Value provided = %.2f, interpolation minimum = %.2f.'\
             % (x, xvec[0])
-        raise Below_interval, msg
+        raise Below_interval(msg)
         
     if x > xvec[-1]: 
         msg = 'Value provided = %.2f, interpolation maximum = %.2f.'\
             %(x, xvec[-1])
-        raise Above_interval, msg        
+        raise Above_interval(msg)
         
         
@@ -400,5 +400,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
         return enquiry_indices
@@ -922,5 +922,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
                           
@@ -1206,5 +1206,5 @@
                 msg = 'Either diameter or width&height must be specified, '
                 msg += 'but not both.'
-                raise Exception, msg
+                raise Exception(msg)
         else:
             if height is not None:
@@ -1220,5 +1220,5 @@
             else:
                 msg = 'Either diameter or width&height must be specified.'
-                raise Exception, msg                
+                raise Exception(msg)
                 
             if height == width:
@@ -1321,5 +1321,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
                           
@@ -1460,5 +1460,5 @@
                     # This is possible since w and z are taken at different locations
                     #msg = 'D < 0.0: %f' %d
-                    #raise msg
+                    #raise Exception(msg)
                     d = 0.0
                 
Index: /trunk/anuga_core/source/anuga/culvert_flows/new_culvert_class.py
===================================================================
--- /trunk/anuga_core/source/anuga/culvert_flows/new_culvert_class.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/culvert_flows/new_culvert_class.py	(revision 8124)
@@ -32,5 +32,5 @@
         x = float(x)
     except:
-        raise Exception, msg
+        raise Exception(msg)
 
 
@@ -39,10 +39,10 @@
         msg = 'Value provided = %.2f, interpolation minimum = %.2f.'\
             % (x, xvec[0])
-        raise Below_interval, msg
+        raise Below_interval(msg)
         
     if x > xvec[-1]: 
         msg = 'Value provided = %.2f, interpolation maximum = %.2f.'\
             %(x, xvec[-1])
-        raise Above_interval, msg        
+        raise Above_interval(msg)
         
         
@@ -403,5 +403,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
         return enquiry_indices
@@ -925,5 +925,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
                           
@@ -1209,5 +1209,5 @@
                 msg = 'Either diameter or width&height must be specified, '
                 msg += 'but not both.'
-                raise Exception, msg
+                raise Exception(msg)
         else:
             if height is not None:
@@ -1223,5 +1223,5 @@
             else:
                 msg = 'Either diameter or width&height must be specified.'
-                raise Exception, msg                
+                raise Exception(msg)
                 
             if height == width:
@@ -1324,5 +1324,5 @@
             else:
                 msg = 'Triangle not found for point (%f, %f)' %point
-                raise Exception, msg
+                raise Exception(msg)
         
                           
@@ -1463,5 +1463,5 @@
                     # This is possible since w and z are taken at different locations
                     #msg = 'D < 0.0: %f' %d
-                    #raise msg
+                    #raise Exception(msg)
                     d = 0.0
                 
Index: /trunk/anuga_core/source/anuga/file/urs.py
===================================================================
--- /trunk/anuga_core/source/anuga/file/urs.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/file/urs.py	(revision 8124)
@@ -40,11 +40,11 @@
         if self.points_num < 0:
             mux_file.close()
-            raise ANUGAError, msg
+            raise ANUGAError(msg)
         if self.time_step_count < 0:
             mux_file.close()
-            raise ANUGAError, msg
+            raise ANUGAError(msg)
         if self.time_step < 0:
             mux_file.close()
-            raise ANUGAError, msg
+            raise ANUGAError(msg)
 
         # The depth is in meters, and it is the distance from the ocean
@@ -209,5 +209,5 @@
             msg = 'Caching was requested, but caching module' \
                   'could not be imported'
-            raise msg
+            raise Exception(msg)
 
         geo = cache(_calculate_boundary_points,
@@ -267,5 +267,5 @@
     if lat_long_set == frozenset([]):
         msg = "URS region specified and polygon does not overlap."
-        raise ValueError, msg
+        raise ValueError(msg)
 
     # Warning there is no info in geospatial saying the hemisphere of
Index: /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py
===================================================================
--- /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/file_conversion/test_file_conversion.py	(revision 8124)
@@ -1211,5 +1211,5 @@
             os.remove(elevation_dir_filename2)
             os.rmdir(elevation_dir)
-            raise 'Should raise exception'
+            raise Exception('Should raise exception')
 
             os.remove(ucur_dir_filename1)
@@ -1914,5 +1914,5 @@
             self.delete_mux(files)
             msg = 'Should have raised exception'
-            raise msg
+            raise Exception(msg)
         sww_file = base_name + '.sww'
         self.delete_mux(files)
@@ -1927,5 +1927,5 @@
             self.delete_mux(files)
             msg = 'Should have raised exception'
-            raise msg
+            raise Exception(msg)
            
     def test_urs2sww(self):
@@ -2393,5 +2393,5 @@
         else:
             msg = 'Should have raised exception'
-            raise msg
+            raise Exception(msg)
        
     def test_lon_lat2gridII(self):
@@ -2407,5 +2407,5 @@
         else:
             msg = 'Should have raised exception'
-            raise msg
+            raise Exception(msg)
         
 
Index: /trunk/anuga_core/source/anuga/file_conversion/urs2sww.py
===================================================================
--- /trunk/anuga_core/source/anuga/file_conversion/urs2sww.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/file_conversion/urs2sww.py	(revision 8124)
@@ -155,5 +155,5 @@
             mux[quantity].close()
         msg = "Due to mint and maxt there's no time info in the boundary SWW."
-        raise Exception, msg
+        raise Exception(msg)
 
     # If this raise is removed there is currently no downstream errors
Index: /trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/interpolate.py	(revision 8124)
@@ -800,5 +800,5 @@
             # This message is time consuming to form due to the conversion of
             msg = 'Time must be a monotonuosly increasing sequence %s' % time
-            raise Exception, msg
+            raise Exception(msg)
 
         # Check if quantities is a single array only
@@ -859,5 +859,5 @@
             #no longer true. sts files have spatial = True but
             #if self.spatial is False:
-            #    raise 'Triangles and vertex_coordinates must be specified'
+            #    raise Exception('Triangles and vertex_coordinates must be specified')
             #
             try:
@@ -868,5 +868,5 @@
                       'or a list of points\n'
                 msg += 'Got: %s.' %(str(self.interpolation_points)[:60] + '...')
-                raise msg
+                raise Exception(msg)
 
             # Ensure 'mesh_boundary_polygon' is defined
@@ -1103,5 +1103,5 @@
                 if x is not None and y is not None:
                     # Interpolate to x, y
-                    raise 'x,y interpolation not yet implemented'
+                    raise Exception('x,y interpolation not yet implemented')
                 else:
                     # Use precomputed point
Index: /trunk/anuga_core/source/anuga/fit_interpolate/test_fit.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test_fit.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/test_fit.py	(revision 8124)
@@ -976,5 +976,5 @@
         else:
             #self.failUnless(0 ==1,  'Bad file did not raise error!')
-            raise 'Bad file did not raise error!'
+            raise Exception('Bad file did not raise error!')
             
         #clean up
@@ -1009,5 +1009,5 @@
             pass
         else:
-            raise 'Bad file did not raise error!'
+            raise Exception('Bad file did not raise error!')
             
         #clean up
@@ -1052,5 +1052,5 @@
             pass
         else:
-            raise 'Bad file did not raise error!'
+            raise Exception('Bad file did not raise error!')
         
         #clean up
@@ -1086,5 +1086,5 @@
             pass
         else:
-            raise 'Verts with no triangles did not raise error!'
+            raise Exception('Verts with no triangles did not raise error!')
         
         #f = interp.fit(data_coords, z)
Index: /trunk/anuga_core/source/anuga/fit_interpolate/test_interpolate.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test_interpolate.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/test_interpolate.py	(revision 8124)
@@ -1170,5 +1170,5 @@
             pass
         else:
-            raise 'Should raise exception'
+            raise Exception('Should raise exception')
 
         try:
@@ -1177,5 +1177,5 @@
             pass
         else:
-            raise 'Should raise exception'        
+            raise Exception('Should raise exception')
 
 
@@ -1235,5 +1235,5 @@
             pass
         else:
-            raise 'Should raise exception'
+            raise Exception('Should raise exception')
 
             
@@ -1294,5 +1294,5 @@
             pass
         else:
-            raise 'Should raise exception'
+            raise Exception('Should raise exception')
 
 
@@ -1504,5 +1504,5 @@
             pass
         else:
-            raise 'Should raise exception'
+            raise Exception('Should raise exception')
 
 
@@ -1667,5 +1667,5 @@
             pass
         else:
-            raise 'Should raise exception due to time being non-monotoneous'            
+            raise Exception('Should raise exception due to time being non-monotoneous')
       
 
Index: /trunk/anuga_core/source/anuga/fit_interpolate/test_search_functions.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test_search_functions.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/test_search_functions.py	(revision 8124)
@@ -31,5 +31,5 @@
                 compile(FN)
             except:
-                raise 'Could not compile %s' %FN
+                raise Exception('Could not compile %s' % FN)
             else:
                 import search_functions_ext
Index: /trunk/anuga_core/source/anuga/geospatial_data/geospatial_data.py
===================================================================
--- /trunk/anuga_core/source/anuga/geospatial_data/geospatial_data.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/geospatial_data/geospatial_data.py	(revision 8124)
@@ -216,5 +216,5 @@
             self.data_points = None
             msg = 'There is no data or file provided!'
-            raise ValueError, msg
+            raise ValueError(msg)
         else:
             self.data_points = ensure_numeric(data_points)
@@ -245,5 +245,5 @@
                 msg = ("Attribute '%s' (%s) could not be converted to a"
                        "numeric vector" % (str(key), str(attributes[key])))
-                raise Exception, msg
+                raise Exception(msg)
 
         self.attributes = attributes
@@ -272,5 +272,5 @@
             msg = ('Argument geo_reference must be a valid Geo_reference '
                    'object or None.')
-            raise Expection, msg
+            raise Expection(msg)
 
         # If a geo_reference already exists, change the point data according to
@@ -296,5 +296,5 @@
         else:
             msg = 'Illegal value: %s' % str(verbose)
-            raise Exception, msg
+            raise Exception(msg)
 
     ##
@@ -494,5 +494,5 @@
                     msg = ('Geospatial data must have the same '
                            'attributes to allow addition.')
-                    raise Exception, msg
+                    raise Exception(msg)
 
                 new_attributes = None
@@ -508,5 +508,5 @@
                         msg = ('Geospatial data must have the same '
                                'attributes to allow addition.')
-                        raise Exception, msg
+                        raise Exception(msg)
         else:
             # other is None:
@@ -549,5 +549,5 @@
         if access(file_name, F_OK) == 0 :
             msg = 'File %s does not exist or is not accessible' % file_name
-            raise IOError, msg
+            raise IOError(msg)
 
         attributes = {}
@@ -558,5 +558,5 @@
             except IOError, e:
                 msg = 'Could not open file %s ' % file_name
-                raise IOError, msg
+                raise IOError(msg)
         elif file_name[-4:] == ".txt" or file_name[-4:]== ".csv":
             try:
@@ -567,13 +567,13 @@
                 msg = ('Could not open file %s. Check the file location.'
                        % file_name)
-                raise IOError, msg
+                raise IOError(msg)
             except SyntaxError, e:
                 # This should only be if there is a format error
                 msg = ('Problem with format of file %s.\n%s'
                        % (file_name, Error_message['IOError']))
-                raise SyntaxError, msg
+                raise SyntaxError(msg)
         else:
             msg = 'Extension %s is unknown' % file_name[-4:]
-            raise IOError, msg
+            raise IOError(msg)
 
         self.data_points = data_points
@@ -636,5 +636,5 @@
         else:
             msg = 'Unknown file type %s ' %file_name
-            raise IOError, msg
+            raise IOError(msg)
 
     ##
@@ -878,5 +878,5 @@
                     msg = ('Geo reference given, then not given.'
                            ' This should not happen.')
-                    raise ValueError, msg
+                    raise ValueError(msg)
                 geo = Geospatial_data(pointlist, att_dict, geo_ref)
             except StopIteration:
@@ -897,5 +897,5 @@
                 msg = ('Could not open file %s.\n%s'
                        % (self.file_name, Error_message['IOError']))
-                raise SyntaxError, msg
+                raise SyntaxError(msg)
         return geo
 
@@ -934,15 +934,15 @@
         msg = ('A georeference is specified yet latitude and longitude '
                'are also specified!')
-        raise ValueError, msg
+        raise ValueError(msg)
 
     if data_points is not None and not points_are_lats_longs:
         msg = ('Data points are specified yet latitude and longitude are '
                'also specified.')
-        raise ValueError, msg
+        raise ValueError(msg)
 
     if points_are_lats_longs:
         if data_points is None:
             msg = "Data points are not specified."
-            raise ValueError, msg
+            raise ValueError(msg)
         lats_longs = ensure_numeric(data_points)
         latitudes = num.ravel(lats_longs[:,0:1])
@@ -951,13 +951,13 @@
     if latitudes is None and longitudes is None:
         msg = "Latitudes and Longitudes are not specified."
-        raise ValueError, msg
+        raise ValueError(msg)
 
     if latitudes is None:
         msg = "Longitudes are specified yet latitudes aren't."
-        raise ValueError, msg
+        raise ValueError(msg)
 
     if longitudes is None:
         msg = "Latitudes are specified yet longitudes aren't."
-        raise ValueError, msg
+        raise ValueError(msg)
 
     data_points, zone  = convert_from_latlon_to_utm(latitudes=latitudes,
@@ -999,5 +999,5 @@
         fid.close()
         msg = "Expected keyword 'points' but could not find it"
-        raise IOError, msg
+        raise IOError(msg)
 
     attributes = {}
@@ -1123,5 +1123,5 @@
                 msg = ('File load error. '
                        'There might be a problem with the file header.')
-                raise SyntaxError, msg
+                raise SyntaxError(msg)
             for i,n in enumerate(numbers):
                 n.strip()
@@ -1175,5 +1175,5 @@
         fid.close()
         msg = "Expected keyword 'points' but could not find it."
-        raise IOError, msg
+        raise IOError(msg)
 
     if verbose: log.critical('Got %d variables: %s' % (len(keys), keys))
@@ -1577,5 +1577,5 @@
         if no_boundary is True:
             msg = 'All boundaries must be defined'
-            raise Expection, msg
+            raise Expection(msg)
 
         poly_topo = [[east_boundary, south_boundary],
@@ -1598,5 +1598,5 @@
         if access(mesh_file,F_OK) == 0:
             msg = "file %s doesn't exist!" % mesh_file
-            raise IOError, msg
+            raise IOError(msg)
 
     # split topo data
@@ -1786,5 +1786,5 @@
         if no_boundary is True:
             msg = 'All boundaries must be defined'
-            raise Expection, msg
+            raise Expection(msg)
 
         poly_topo = [[east_boundary, south_boundary],
@@ -1806,5 +1806,5 @@
         if access(mesh_file,F_OK) == 0:
             msg = "file %s doesn't exist!" % mesh_file
-            raise IOError, msg
+            raise IOError(msg)
 
     # split topo data
Index: /trunk/anuga_core/source/anuga/geospatial_data/test_geospatial_data.py
===================================================================
--- /trunk/anuga_core/source/anuga/geospatial_data/test_geospatial_data.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/geospatial_data/test_geospatial_data.py	(revision 8124)
@@ -118,5 +118,5 @@
             pass
         else:
-            raise Exception, 'Should have raised exception'
+            raise Exception('Should have raised exception')
 
     def test_get_data_points(self):
@@ -731,5 +731,5 @@
         else:
             msg = 'Different zones in Geo references not caught.'
-            raise Exception, msg
+            raise Exception(msg)
 
         os.remove(fileName)
@@ -795,5 +795,5 @@
         else:
             msg = 'Bad file did not raise error!'
-            raise Exception, msg
+            raise Exception(msg)
         os.remove(fileName)
 
@@ -824,5 +824,5 @@
         else:
             msg = 'Bad file did not raise error!'
-            raise Exception, msg
+            raise Exception(msg)
         os.remove(fileName)
 
@@ -847,5 +847,5 @@
         else:
             msg = 'Bad file did not raise error!'
-            raise Exception, msg
+            raise Exception(msg)
         os.remove(fileName)
 
@@ -876,5 +876,5 @@
         else:
             msg = 'Bad file did not raise error!'
-            raise Exception, msg
+            raise Exception(msg)
         os.remove(fileName)
 
@@ -1197,5 +1197,5 @@
         else:
             msg = 'imaginary file did not raise error!'
-            raise Exception, msg
+            raise Exception(msg)
 
     def test_create_from_pts_file(self):
@@ -1451,5 +1451,5 @@
         else:
             msg = 'Instance must have a filename or data points'
-            raise Exception, msg
+            raise Exception(msg)
 
     def test_load_csv_lat_long(self):
@@ -1507,5 +1507,5 @@
         else:
             msg = 'Different zones in Geo references not caught.'
-            raise Exception, msg
+            raise Exception(msg)
 
         os.remove(fileName)
Index: /trunk/anuga_core/source/anuga/get_version.py
===================================================================
--- /trunk/anuga_core/source/anuga/get_version.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/get_version.py	(revision 8124)
@@ -38,5 +38,5 @@
     msg = 'Command %s could not execute.'
     msg += 'Make sure the program SubWCRev.exe is available on your path'
-    raise msg
+    raise Exception(msg)
 
 
Index: /trunk/anuga_core/source/anuga/mesh_engine/mesh_engine.py
===================================================================
--- /trunk/anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/mesh_engine/mesh_engine.py	(revision 8124)
@@ -49,8 +49,8 @@
     except ValueError:
         msg = 'ERROR: Inconsistent points array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     if points.shape[1] <>2:
         msg = 'ERROR: Bad shape points array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
 
     # This is after points is numeric
@@ -64,5 +64,5 @@
     except ValueError:
         msg = 'ERROR: Inconsistent segments array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     
     # This is after segments is numeric
@@ -74,5 +74,5 @@
     except ValueError:
         msg = 'ERROR: Inconsistent holess array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
 
    
@@ -82,9 +82,9 @@
     except  (ValueError, TypeError):
         msg = 'ERROR: Inconsistent regions array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
         
     if not regions.shape[0] == 0 and regions.shape[1] <= 2:
         msg = 'ERROR: Bad shape points array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     
     try:
@@ -92,10 +92,10 @@
     except (ValueError, TypeError):
         msg = 'ERROR: Inconsistent point attributes array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
 
     if pointatts.shape[0] <> points.shape[0]:
         msg = """ERROR: Point attributes array not the same shape as
         point array."""
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     if len(pointatts.shape) == 1:
         pointatts = num.reshape(pointatts,(pointatts.shape[0],1))
@@ -105,9 +105,9 @@
     except ValueError:
         msg = 'ERROR: Inconsistent point attributes array.'
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     if segatts.shape[0] <> segments.shape[0]:
         msg = """ERROR: Segment attributes array not the same shape as
         segment array."""
-        raise ANUGAError, msg
+        raise ANUGAError(msg)
     
     if mode.find('n'):
@@ -186,5 +186,5 @@
                 #len(region) <= 2:
                 #msg = 'ERROR: Inconsistent regions array.'
-                #raise msg
+                #raise Exception(msg)
             #elif
     return regions
Index: /trunk/anuga_core/source/anuga/pmesh/Pmw.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/Pmw.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/pmesh/Pmw.py	(revision 8124)
@@ -43,9 +43,9 @@
 def setversion(version):
     if version != _VERSION:
-        raise ValueError, 'Dynamic versioning not available'
+        raise ValueError('Dynamic versioning not available')
 
 def setalphaversions(*alpha_versions):
     if alpha_versions != ():
-	raise ValueError, 'Dynamic versioning not available'
+	raise ValueError('Dynamic versioning not available')
 
 def version(alpha = 0):
@@ -258,5 +258,5 @@
 	# It's not a valid type
 	else:
-	    raise TypeError, 'toPart must be attribute name, function or method'
+	    raise TypeError('toPart must be attribute name, function or method')
 
     # get the full set of candidate methods
@@ -524,9 +524,9 @@
 
 	if self.__componentInfo.has_key(componentName):
-	    raise ValueError, 'Component "%s" already exists' % componentName
+	    raise ValueError('Component "%s" already exists' % componentName)
 
 	if '_' in componentName:
-	    raise ValueError, \
-                    'Component name "%s" must not contain "_"' % componentName
+	    raise ValueError('Component name "%s" must not contain "_"'
+                             % componentName)
 
 	if hasattr(self, '_constructorKeywords'):
@@ -654,6 +654,6 @@
 		else:
 		    text = 'Unknown options "'
-		raise KeyError, text + string.join(unusedOptions, ', ') + \
-			'" for ' + self.__class__.__name__
+		raise KeyError(text + string.join(unusedOptions, ', ')
+                               + '" for ' + self.__class__.__name__)
 
 	    # Call the configuration callback function for every option.
@@ -733,7 +733,7 @@
 		# Make sure it is not an initialisation option.
 		if optionInfo[option][FUNCTION] is INITOPT:
-		    raise KeyError, \
-			    'Cannot configure initialisation option "' \
-			    + option + '" for ' + self.__class__.__name__
+		    raise KeyError('Cannot configure initialisation option "'
+                                   + option + '" for '
+                                   + self.__class__.__name__)
 		optionInfo[option][VALUE] = value
 		directOptions.append(option)
@@ -768,6 +768,6 @@
                         if len(componentConfigFuncs) == 0 and \
                                 component not in self._dynamicGroups:
-			    raise KeyError, 'Unknown option "' + option + \
-				    '" for ' + self.__class__.__name__
+			    raise KeyError('Unknown option "' + option + '" for '
+                                           + self.__class__.__name__)
 
 		    # Add the configure method(s) (may be more than
@@ -780,6 +780,6 @@
 				= value
 		else:
-		    raise KeyError, 'Unknown option "' + option + \
-			    '" for ' + self.__class__.__name__
+		    raise KeyError('Unknown option "' + option + '" for '
+                                   + self.__class__.__name__)
 
 	# Call the configure methods for any components.
@@ -874,6 +874,6 @@
 			    return componentCget(componentOption)
 
-	raise KeyError, 'Unknown option "' + option + \
-		'" for ' + self.__class__.__name__
+	raise KeyError('Unknown option "' + option + '" for '
+                       + self.__class__.__name__)
 
     __getitem__ = cget
@@ -1167,5 +1167,5 @@
     def activate(self, globalMode = 0, geometry = 'centerscreenfirst'):
 	if self._active:
-	    raise ValueError, 'Window is already active'
+	    raise ValueError('Window is already active')
 	if self.state() == 'normal':
 	    self.withdraw()
@@ -1408,5 +1408,5 @@
             _toplevelBusyInfo[window]['busyCursorName'] = value
         else:
-            raise KeyError, 'Unknown busycursor attribute "' + name + '"'
+            raise KeyError('Unknown busycursor attribute "' + name + '"')
 
 def _addRootToToplevelBusyInfo():
@@ -1423,7 +1423,6 @@
 def busycallback(command, updateFunction = None):
     if not callable(command):
-	raise ValueError, \
-	    'cannot register non-command busy callback %s %s' % \
-	        (repr(command), type(command))
+	raise ValueError('cannot register non-command busy callback %s %s'
+                         % (repr(command), type(command)))
     wrapper = _BusyWrapper(command, updateFunction)
     return wrapper.callback
@@ -1593,5 +1592,5 @@
                 _traceTkFile.write('CALL  TK> stack:\n')
                 traceback.print_stack()
-            raise Tkinter.TclError, errorString
+            raise Tkinter.TclError(errorString)
 
         _recursionCounter = _recursionCounter - 1
@@ -1812,5 +1811,5 @@
 	    return apply(self.func, args)
 	except SystemExit, msg:
-	    raise SystemExit, msg
+	    raise SystemExit(msg)
 	except:
 	    _reporterror(self.func, args)
@@ -2044,7 +2043,6 @@
         pos = self['buttonboxpos']
 	if pos not in 'nsew':
-	    raise ValueError, \
-	        'bad buttonboxpos option "%s":  should be n, s, e, or w' \
-		    % pos
+	    raise ValueError('bad buttonboxpos option "%s":  should be n, s, e, or w'
+                             % pos)
 
 	if pos in 'ns':
@@ -2141,6 +2139,6 @@
 	buttons = self['buttons']
 	if type(buttons) != types.TupleType and type(buttons) != types.ListType:
-	    raise ValueError, \
-	        'bad buttons option "%s": should be a tuple' % str(buttons)
+	    raise ValueError('bad buttons option "%s": should be a tuple'
+                             % str(buttons))
 	if self.oldButtons == buttons:
 	  return
@@ -2195,5 +2193,5 @@
   inputList = string.split(string.strip(text), separator)
   if len(inputList) != 3:
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
 
   sign = 1
@@ -2204,5 +2202,5 @@
 
   if re.search('[^0-9]', string.join(inputList, '')) is not None:
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
 
   hour = string.atoi(inputList[0])
@@ -2211,5 +2209,5 @@
 
   if minute >= 60 or second >= 60:
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
   return sign * (hour * 60 * 60 + minute * 60 + second)
 
@@ -2229,8 +2227,8 @@
   inputList = string.split(string.strip(text), separator)
   if len(inputList) != 3:
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
 
   if re.search('[^0-9]', string.join(inputList, '')) is not None:
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
   formatList = list(format)
   day = string.atoi(inputList[formatList.index('d')])
@@ -2247,5 +2245,5 @@
   jdn = ymdtojdn(year, month, day)
   if jdntoymd(jdn) != (year, month, day):
-    raise ValueError, 'invalid value: ' + text
+    raise ValueError('invalid value: ' + text)
   return jdn
 
@@ -2328,5 +2326,5 @@
     if separator != '.':
 	if string.find(text, '.') >= 0:
-	    raise ValueError, 'invalid value: ' + text
+	    raise ValueError('invalid value: ' + text)
 	index = string.find(text, separator)
 	if index >= 0:
@@ -2546,12 +2544,12 @@
     def _state(self):
 	if self['state'] not in ('both', 'balloon', 'status', 'none'):
-	    raise ValueError, 'bad state option ' + repr(self['state']) + \
-		': should be one of \'both\', \'balloon\', ' + \
-		'\'status\' or \'none\''
+	    raise ValueError('bad state option ' + repr(self['state'])
+                             + ": should be one of 'both', 'balloon', "
+                             + "'status' or 'none'")
 
     def _relmouse(self):
 	if self['relmouse'] not in ('both', 'x', 'y', 'none'):
-	    raise ValueError, 'bad relmouse option ' + repr(self['relmouse'])+ \
-		': should be one of \'both\', \'x\', ' + '\'y\' or \'none\''
+	    raise ValueError("bad relmouse option %s: should be one of 'both', 'x', "
+                             "'y' or 'none'" % repr(self['relmouse']))
 
     def _enter(self, event, widget, statusHelp, balloonHelp, isItem):
@@ -2747,6 +2745,6 @@
 	    interior.grid_rowconfigure(columnOrRow, weight = 1)
 	else:
-	    raise ValueError, 'bad orient option ' + repr(orient) + \
-		': must be either \'horizontal\' or \'vertical\''
+	    raise ValueError("bad orient option %s: must be either 'horizontal' or "
+                             "'vertical'" % repr(orient))
 
 	# Initialise instance variables.
@@ -2782,5 +2780,5 @@
 		return index
 	    else:
-		raise ValueError, 'index "%s" is out of range' % index
+		raise ValueError('index "%s" is out of range' % index)
 	elif index is END:
 	    if forInsert:
@@ -2789,9 +2787,9 @@
 		return listLength - 1
 	    else:
-		raise ValueError, 'ButtonBox has no buttons'
+		raise ValueError('ButtonBox has no buttons')
 	elif index is DEFAULT:
 	    if self._defaultButton is not None:
 		return self._defaultButton
-	    raise ValueError, 'ButtonBox has no default'
+	    raise ValueError('ButtonBox has no default')
 	else:
             names = map(lambda t: t[0], self._buttonList)
@@ -2799,10 +2797,9 @@
                 return names.index(index)
 	    validValues = 'a name, a number, END or DEFAULT'
-	    raise ValueError, \
-		'bad index "%s": must be %s' % (index, validValues)
+	    raise ValueError('bad index "%s": must be %s' % (index, validValues))
 
     def insert(self, componentName, beforeComponent = 0, **kw):
 	if componentName in self.components():
-	    raise ValueError, 'button "%s" already exists' % componentName
+	    raise ValueError('button "%s" already exists' % componentName)
 	if not kw.has_key('text'):
 	    kw['text'] = componentName
@@ -3112,5 +3109,5 @@
 	    msg = 'bad %s value "%s":  must be a function or one of ' \
 		'the standard validators %s or extra validators %s'
-	    raise ValueError, msg % (option, validator, standard, extra)
+	    raise ValueError(msg % (option, validator, standard, extra))
 
     def _executeCommand(self, event = None):
@@ -3638,5 +3635,5 @@
 
         if (menuName) in self.components():
-            raise ValueError, 'menu "%s" already exists' % menuName
+            raise ValueError('menu "%s" already exists' % menuName)
 
         menukw = {}
@@ -3697,5 +3694,5 @@
             command = menu.add_cascade
         else:
-            raise ValueError, 'unknown menuitem type "%s"' % itemType
+            raise ValueError('unknown menuitem type "%s"' % itemType)
 
         self._menuInfo[menuName][1].append(statusHelp)
@@ -3875,5 +3872,5 @@
 
         if (menuName + '-menu') in self.components():
-            raise ValueError, 'menu "%s" already exists' % menuName
+            raise ValueError('menu "%s" already exists' % menuName)
 
         menukw = {}
@@ -3940,5 +3937,5 @@
             command = menu.add_cascade
         else:
-            raise ValueError, 'unknown menuitem type "%s"' % itemType
+            raise ValueError('unknown menuitem type "%s"' % itemType)
 
         self._menuInfo[menuName][1].append(statusHelp)
@@ -4206,7 +4203,6 @@
 		    Tkinter.Label, (interior,))
 	    if iconpos not in 'nsew':
-		raise ValueError, \
-		    'bad iconpos option "%s":  should be n, s, e, or w' \
-			% iconpos
+		raise ValueError('bad iconpos option "%s":  should be n, s, e, or w'
+                                 % iconpos)
 
 	    if iconpos in 'nw':
@@ -4273,6 +4269,6 @@
         tabpos = self['tabpos']
 	if tabpos is not None and tabpos != 'n':
-            raise ValueError, \
-                'bad tabpos option %s:  should be n or None' % repr(tabpos)
+            raise ValueError('bad tabpos option %s:  should be n or None'
+                             % repr(tabpos))
         self._withTabs = (tabpos is not None)
         self._pageMargin = self['pagemargin']
@@ -4366,5 +4362,5 @@
 	if self._pageAttrs.has_key(pageName):
 	    msg = 'Page "%s" already exists.' % pageName
-	    raise ValueError, msg
+	    raise ValueError(msg)
 
         # Do this early to catch bad <before> spec before creating any items.
@@ -4388,5 +4384,5 @@
                 del kw[key]
             else:
-		raise KeyError, 'Unknown option "' + key + '"'
+		raise KeyError('Unknown option "' + key + '"')
 
         # Create the frame to contain the page.
@@ -4513,5 +4509,5 @@
 		return index
 	    else:
-		raise ValueError, 'index "%s" is out of range' % index
+		raise ValueError('index "%s" is out of range' % index)
 	elif index is END:
 	    if forInsert:
@@ -4520,8 +4516,8 @@
 		return listLength - 1
 	    else:
-		raise ValueError, 'NoteBook has no pages'
+		raise ValueError('NoteBook has no pages')
 	elif index is SELECT:
 	    if listLength == 0:
-		raise ValueError, 'NoteBook has no pages'
+		raise ValueError('NoteBook has no pages')
             return self._pageNames.index(self.getcurselection())
 	else:
@@ -4529,6 +4525,5 @@
                 return self._pageNames.index(index)
 	    validValues = 'a name, a number, END or SELECT'
-	    raise ValueError, \
-                'bad index "%s": must be %s' % (index, validValues)
+	    raise ValueError('bad index "%s": must be %s' % (index, validValues))
 
     def selectpage(self, page):
@@ -4977,10 +4972,10 @@
 		return index
 	    else:
-		raise ValueError, 'index "%s" is out of range' % index
+		raise ValueError('index "%s" is out of range' % index)
 	elif index is END:
 	    if listLength > 0:
 		return listLength - 1
 	    else:
-		raise ValueError, 'OptionMenu has no items'
+		raise ValueError('OptionMenu has no items')
 	else:
 	    if index is SELECT:
@@ -4988,10 +4983,9 @@
 		    index = self.getcurselection()
 		else:
-		    raise ValueError, 'OptionMenu has no items'
+		    raise ValueError('OptionMenu has no items')
             if index in self._itemList:
                 return self._itemList.index(index)
-	    raise ValueError, \
-		    'bad index "%s": must be a ' \
-                    'name, a number, END or SELECT' % (index,)
+	    raise ValueError('bad index "%s": must be a name, a number, END or SELECT'
+                             % (index,))
 
     def invoke(self, index = SELECT):
@@ -5043,6 +5037,6 @@
 
 	if self['orient'] not in ('horizontal', 'vertical'):
-	    raise ValueError, 'bad orient option ' + repr(self['orient']) + \
-		': must be either \'horizontal\' or \'vertical\''
+	    raise ValueError("bad orient option %s: must be either 'horizontal' or "
+                             "'vertical'" % repr(self['orient']))
 
         self._separatorThickness = self['separatorthickness']
@@ -5237,5 +5231,5 @@
 		self._max[name], self._relmax[name] = value, relvalue
 	    else:
-		raise ValueError, 'keyword must be "size", "min", or "max"'
+		raise ValueError('keyword must be "size", "min", or "max"')
 
     def _absSize(self, relvalue):
@@ -5743,6 +5737,6 @@
 	    self._singleSelect = 0
 	else: 
-	    raise ValueError, 'bad selectmode option "' + \
-		    self['selectmode'] + '": should be single or multiple'
+	    raise ValueError('bad selectmode option "' + self['selectmode']
+                             + '": should be single or multiple')
 
 	if self['buttontype'] == 'button':
@@ -5756,7 +5750,6 @@
 	    self.buttonClass = Tkinter.Checkbutton
 	else:
-	    raise ValueError, 'bad buttontype option "' + \
-		    self['buttontype'] + \
-		    '": should be button, radiobutton or checkbutton'
+	    raise ValueError('bad buttontype option "' + self['buttontype']
+                             + '": should be button, radiobutton or checkbutton')
 
 	if self._singleSelect:
@@ -5766,6 +5759,6 @@
 
 	if self['orient'] not in ('horizontal', 'vertical'):
-	    raise ValueError, 'bad orient option ' + repr(self['orient']) + \
-		': must be either \'horizontal\' or \'vertical\''
+	    raise ValueError('bad orient option ' + repr(self['orient'])
+                             + ': must be either \'horizontal\' or \'vertical\'')
 
 	# Check keywords and initialise options.
@@ -5817,10 +5810,10 @@
 		return index
 	    else:
-		raise ValueError, 'index "%s" is out of range' % index
+		raise ValueError('index "%s" is out of range' % index)
 	elif index is END:
 	    if listLength > 0:
 		return listLength - 1
 	    else:
-		raise ValueError, 'RadioSelect has no buttons'
+		raise ValueError('RadioSelect has no buttons')
 	else:
 	    for count in range(listLength):
@@ -5829,6 +5822,5 @@
 		    return count
 	    validValues = 'a name, a number or END'
-	    raise ValueError, \
-		    'bad index "%s": must be %s' % (index, validValues)
+	    raise ValueError('bad index "%s": must be %s' % (index, validValues))
 
     def button(self, buttonIndex):
@@ -5838,5 +5830,5 @@
     def add(self, componentName, **kw):
 	if componentName in self._buttonList:
-	    raise ValueError, 'button "%s" already exists' % componentName
+	    raise ValueError('button "%s" already exists' % componentName)
 
 	kw['command'] = \
@@ -6061,5 +6053,5 @@
 	else:
 	    message = 'bad hscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -6081,5 +6073,5 @@
 	else:
 	    message = 'bad vscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -6483,5 +6475,5 @@
 	else:
 	    message = 'bad hscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
     def _vscrollMode(self):
@@ -6501,5 +6493,5 @@
 	else:
 	    message = 'bad vscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
     def _horizflex(self):
@@ -6511,5 +6503,5 @@
 	    message = 'bad horizflex option "%s": should be one of %s' % \
 		    (flex, str(self._flexoptions))
-	    raise ValueError, message
+	    raise ValueError(message)
 
 	self.reposition()
@@ -6523,5 +6515,5 @@
 	    message = 'bad vertflex option "%s": should be one of %s' % \
 		    (flex, str(self._flexoptions))
-	    raise ValueError, message
+	    raise ValueError(message)
 
 	self.reposition()
@@ -6818,5 +6810,5 @@
                 self._listbox.selection_set(listitems.index(textOrList))
             else:
-                raise ValueError, 'no such item "%s"' % textOrList
+                raise ValueError('no such item "%s"' % textOrList)
         else:
             for item in textOrList:
@@ -6824,5 +6816,5 @@
                     self._listbox.selection_set(listitems.index(item))
                 else:
-                    raise ValueError, 'no such item "%s"' % item
+                    raise ValueError('no such item "%s"' % item)
 
     def setlist(self, items):
@@ -6861,5 +6853,5 @@
 	else:
 	    message = 'bad hscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -6881,5 +6873,5 @@
 	else:
 	    message = 'bad vscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -7282,5 +7274,5 @@
 	else:
 	    message = 'bad hscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -7302,5 +7294,5 @@
 	else:
 	    message = 'bad vscrollmode option "%s": should be static, dynamic, or none' % mode
-	    raise ValueError, message
+	    raise ValueError(message)
 
         self._configureScrollCommands()
@@ -8037,5 +8029,5 @@
         list = string.split(text, ':')
 	if len(list) != 3:
-	    raise ValueError, 'invalid value: ' + text
+	    raise ValueError('invalid value: ' + text)
 
 	self._hour = string.atoi(list[0])
@@ -8363,5 +8355,5 @@
 		index = list(items).index(text)
 	    else:
-	    	raise IndexError, 'index "%s" not found' % text
+	    	raise IndexError('index "%s" not found' % text)
 	elif setentry:
 	    text = self._list.get(0, 'end')[index]
@@ -8737,6 +8729,6 @@
 		frame.grid_columnconfigure(0, pad = padx)
 	else:
-	    raise ValueError, 'bad orient option ' + repr(orient) + \
-		': must be either \'horizontal\' or \'vertical\''
+	    raise ValueError('bad orient option ' + repr(orient)
+                             + ': must be either \'horizontal\' or \'vertical\'')
 
 	self.createlabel(interior)
@@ -8848,6 +8840,6 @@
 	    validValues = _counterCommands.keys()
 	    validValues.sort()
-	    raise ValueError, ('bad datatype value "%s":  must be a' +
-		    ' function or one of %s') % (datatype, validValues)
+	    raise ValueError('bad datatype value "%s":  must be a function '
+                             'or one of %s' % (datatype, validValues))
 
     def _forceCount(self, factor):
@@ -9105,5 +9097,5 @@
 def logicalfont(name='Helvetica', sizeIncr = 0, **kw):
   if not _fontInfo.has_key(name):
-    raise ValueError, 'font %s does not exist' % name
+    raise ValueError('font %s does not exist' % name)
 
   rtn = []
Index: /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py
===================================================================
--- /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/pmesh/mesh_interface.py	(revision 8124)
@@ -110,5 +110,5 @@
             msg = 'Caching was requested, but caching module'+\
                   'could not be imported'
-            raise msg
+            raise Exception(msg)
 
 
@@ -152,5 +152,5 @@
                       %(str(key))
                 msg += 'Number of points in bounding polygon = %d' % max_points
-                raise SegmentError, msg
+                raise SegmentError(msg)
 
         for i in range(max_points):
@@ -162,5 +162,5 @@
                 msg = 'Segment %d was not assigned a boundary_tag.' % i
                 msg +=  'Default tag "exterior" will be assigned to missing segment'
-                #raise Exception, msg
+                #raise Exception(msg)
                 # Fixme: Use proper Python warning
                 if verbose: log.critical('WARNING: %s' % msg)
@@ -197,5 +197,5 @@
 
                 if fail_if_polygons_outside is True:
-                    raise PolygonError, msg                    
+                    raise PolygonError(msg)
                 else:
                     msg += ' I will ignore it.'
@@ -239,5 +239,5 @@
                 msg = 'Interior polygon %s is outside bounding polygon: %s'\
                       %(str(interior_polygon), str(bounding_polygon))
-                raise PolygonError, msg
+                raise PolygonError(msg)
 
     # Resolve geo referencing        
Index: /trunk/anuga_core/source/anuga/shallow_water/boundaries.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/boundaries.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/boundaries.py	(revision 8124)
@@ -48,7 +48,4 @@
     """
 
-    ##
-    # @brief Instantiate a Reflective_boundary.
-    # @param domain 
     def __init__(self, domain=None):
         Boundary.__init__(self)
@@ -66,16 +63,12 @@
         self.conserved_quantities = num.zeros(3, num.float)
 
-    ##
-    # @brief Return a representation of this instance.
     def __repr__(self):
         return 'Reflective_boundary'
 
-    ##
-    # @brief Calculate reflections (reverse outward momentum).
-    # @param vol_id 
-    # @param edge_id 
     def evaluate(self, vol_id, edge_id):
-        """Reflective boundaries reverses the outward momentum
-        of the volume they serve.
+        """Calculate reflections (reverse outward momentum).
+
+        vol_id   
+        edge_id  
         """
 
Index: /trunk/anuga_core/source/anuga/shallow_water/forcing.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/forcing.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/forcing.py	(revision 8124)
@@ -44,5 +44,5 @@
             msg = 'Function %s could not be executed:\n%s' %(f, e)
             # FIXME: Reconsider this semantics
-            raise Exception, msg
+            raise Exception(msg)
 
         try:
@@ -52,5 +52,5 @@
                    'be converted into a numeric array of floats.\nSpecified '
                    'function should return either list or array.' % f)
-            raise Exception, msg
+            raise Exception(msg)
 
         # Is this really what we want?
@@ -63,5 +63,5 @@
         except:
             msg = '%s must return vector' % func_msg
-            raise Exception, msg
+            raise Exception(msg)
         msg = '%s must return vector of length %d' % (func_msg, N)
         assert result_len == N, msg
@@ -72,5 +72,5 @@
             msg = ('Force field %s must be a scalar value coercible to float.'
                    % str(f))
-            raise Exception, msg
+            raise Exception(msg)
 
     return f
@@ -147,5 +147,5 @@
                phi = kwargs['phi']
            else:
-               raise Exception, 'Assumes two keyword arguments: s=..., phi=....'
+               raise Exception('Assumes two keyword arguments: s=..., phi=....')
 
         if ( self.use_coordinates ):
@@ -183,5 +183,5 @@
             except:
                 msg = 'Speed must be either callable or a scalar: %s' %self.s
-                raise msg
+                raise Exception(msg)
 
         if callable(self.phi):
@@ -200,5 +200,5 @@
             except:
                 msg = 'Angle must be either callable or a scalar: %s' %self.phi
-                raise msg
+                raise Exception(msg)
 
         assign_windfield_values(xmom_update, ymom_update,
@@ -388,5 +388,5 @@
                 msg = 'No triangles have been identified in '
                 msg += 'specified region: %s' % inlet_region
-                raise Exception, msg
+                raise Exception(msg)
 
             # Compute exchange area as the sum of areas of triangles identified
@@ -421,5 +421,5 @@
                 default_rate(0.0)
             except:
-                raise Exception, msg
+                raise Exception(msg)
 
         self.default_rate = default_rate
@@ -437,5 +437,5 @@
             rate = self.update_rate(t)
         except Modeltime_too_early, e:
-            raise Modeltime_too_early, e
+            raise Modeltime_too_early(e)
         except Modeltime_too_late, e:
             if self.default_rate is None:
@@ -443,5 +443,5 @@
                 msg += 'You can specify keyword argument default_rate in the '
                 msg += 'forcing function to tell it what to do in the absence of time data.'
-                raise Modeltime_too_late, msg    
+                raise Modeltime_too_late(msg)
             else:
                 # Pass control to default rate function
@@ -464,5 +464,5 @@
             msg = ('Attribute rate must be specified in General_forcing '
                    'or its descendants before attempting to call it')
-            raise Exception, msg
+            raise Exception(msg)
 
         # Now rate is a number
@@ -947,5 +947,6 @@
                self.use_coordinates = kwargs['use_coordinates']
            else:
-               raise Exception, 'Assumes one keyword argument: p=... or two keyword arguments p=...,use_coordinates=...'
+               raise Exception('Assumes one keyword argument: p=... or two '
+                               'keyword arguments p=...,use_coordinates=...')
 
         if ( self.use_coordinates ):
@@ -980,5 +981,5 @@
             except:
                 msg = 'Pressure must be either callable or a scalar: %s' %self.s
-                raise msg
+                raise Exception(msg)
 
         stage = domain.quantities['stage']
@@ -1093,5 +1094,6 @@
                     self.use_coordinates=False
                 else:
-                    raise Exception, 'Assumes zero or two keyword arguments filename=...,domain=...'
+                    raise Exception('Assumes zero or two keyword arguments '
+                                    'filename=...,domain=...')
 
                 if ( self.use_coordinates ):
@@ -1110,5 +1112,7 @@
                self.use_coordinates = False
            else:
-               raise Exception, 'Assumes one keyword argument: p=f(t,x,y,) or three keyword arguments p=f(t,i),filename=...,domain=...'
+               raise Exception('Assumes one keyword argument: p=f(t,x,y,) or '
+                               'three keyword arguments '
+                               'p=f(t,i),filename=...,domain=...')
 
         if ( self.use_coordinates ):
@@ -1126,9 +1130,9 @@
             msg = 'pressure_file.starttime > domain.starttime'
             if (self.file_time[0]>domain.starttime):
-                raise Exception, msg
+                raise Exception(msg)
 
             msg = 'pressure_file[-1] < domain.starttime'
             if (self.file_time[-1]<domain.starttime):
-                raise Exception, msg
+                raise Exception(msg)
 
             msg = 'No pressure values exist for times greater than domain.starttime'
@@ -1185,5 +1189,5 @@
             except:
                 msg = 'Pressure must be either callable function or a scalar: %s' %self.s
-                raise msg
+                raise Exception(msg)
 
         stage = domain.quantities['stage']
@@ -1288,5 +1292,5 @@
                phi = kwargs['phi']
            else:
-               raise Exception, 'Assumes two keyword arguments: s=..., phi=....'
+               raise Exception('Assumes two keyword arguments: s=...,phi=....')
 
         if ( self.use_coordinates ):
@@ -1307,13 +1311,13 @@
             msg = 'wind_file.starttime > domain.starttime'
             if (self.file_time[0]>domain.starttime):
-                raise Exception, msg
+                raise Exception(msg)
 
             msg = 'wind_file[-1] < domain.starttime'
             if (self.file_time[-1]<domain.starttime):
-                raise Exception, msg
+                raise Exception(msg)
 
             msg = 'No wind values exist for times greater than domain.starttime'
             if (self.file_time[-2]<domain.starttime and self.file_time[-1]>domain.starttime):
-                raise Exception, msg
+                raise Exception(msg)
 
             # FIXME(JJ): How do we check that evolve 
@@ -1373,5 +1377,5 @@
             except:
                 msg = 'Speed must be either callable or a scalar: %s' %self.s
-                raise msg
+                raise Exception(msg)
 
         if callable(self.phi):
@@ -1395,5 +1399,5 @@
             except:
                 msg = 'Angle must be either callable or a scalar: %s' %self.phi
-                raise msg
+                raise Exception(msg)
 
         assign_windfield_values(xmom_update, ymom_update,
Index: /trunk/anuga_core/source/anuga/shallow_water/most2nc.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/most2nc.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/most2nc.py	(revision 8124)
@@ -13,11 +13,13 @@
 
 
-##
-# @brief Convert a MOST file to NetCDF format.
-# @param input_file The input file to convert.
-# @param output_file The name of the oputput NetCDF file to create,
-# @param inverted_bathymetry ??
-# @param verbose True if the function is to be verbose.
 def most2nc(input_file, output_file, inverted_bathymetry=False, verbose=True):
+    """Convert a MOST file to NetCDF format.
+
+    input_file           the input file to convert
+    output_file          the name of the oputput NetCDF file to create
+    inverted_bathymetry  ??
+    verbose              True if the function is to be verbose
+    """
+
     # variable names
     long_name = 'LON'
Index: /trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/shallow_water_domain.py	(revision 8124)
@@ -301,27 +301,22 @@
             #self.reduction = min  #Looks better near steep slopes
 
-    ##
-    # @brief Set the minimum depth that will be written to an SWW file.
-    # @param minimum_storable_height The minimum stored height (in m).
     def set_minimum_storable_height(self, minimum_storable_height):
-        """Set the minimum depth that will be recognised when writing
-        to an sww file. This is useful for removing thin water layers
-        that seems to be caused by friction creep.
-
-        The minimum allowed sww depth is in meters.
+        """Set the minimum depth that will be written to an SWW file.
+
+        minimum_storable_height  minimum allowed SWW depth is in meters
+
+        This is useful for removing thin water layers that seems to be caused
+        by friction creep.
         """
 
         self.minimum_storable_height = minimum_storable_height
 
-    ##
-    # @brief
-    # @param minimum_allowed_height
     def set_minimum_allowed_height(self, minimum_allowed_height):
         """Set minimum depth that will be recognised in the numerical scheme.
 
-        The minimum allowed depth is in meters.
-
-        The parameter H0 (Minimal height for flux computation)
-        is also set by this function
+        minimum_allowed_height  minimum allowed depth in meters
+
+        The parameter H0 (Minimal height for flux computation) is also set by
+        this function.
         """
 
@@ -335,37 +330,26 @@
         self.H0 = minimum_allowed_height
 
-    ##
-    # @brief
-    # @param maximum_allowed_speed
     def set_maximum_allowed_speed(self, maximum_allowed_speed):
-        """Set the maximum particle speed that is allowed in water
-        shallower than minimum_allowed_height. This is useful for
-        controlling speeds in very thin layers of water and at the same time
-        allow some movement avoiding pooling of water.
+        """Set the maximum particle speed that is allowed in water shallower
+        than minimum_allowed_height.
+
+        maximum_allowed_speed  
+
+        This is useful for controlling speeds in very thin layers of water and
+        at the same time allow some movement avoiding pooling of water.
         """
 
         self.maximum_allowed_speed = maximum_allowed_speed
 
-    ##
-    # @brief
-    # @param points_file_block_line_size
     def set_points_file_block_line_size(self, points_file_block_line_size):
-        """Set the minimum depth that will be recognised when writing
-        to an sww file. This is useful for removing thin water layers
-        that seems to be caused by friction creep.
-
-        The minimum allowed sww depth is in meters.
-        """
+        """
+        """
+
         self.points_file_block_line_size = points_file_block_line_size
 
         
     # FIXME: Probably obsolete in its curren form    
-    ##
-    # @brief Set the quantities that will be written to an SWW file.
-    # @param q The quantities to be written.
-    # @note Param 'q' may be None, single quantity or list of quantity strings.
-    # @note If 'q' is None, no quantities will be stored in the SWW file.
     def set_quantities_to_be_stored(self, q):
-        """Specify which quantities will be stored in the sww file
+        """Specify which quantities will be stored in the SWW file.
         
         q must be either:
@@ -409,7 +393,4 @@
         self.quantities_to_be_stored = q
 
-    ##
-    # @brief
-    # @param indices
     def get_wet_elements(self, indices=None):
         """Return indices for elements where h > minimum_allowed_height
@@ -439,7 +420,4 @@
         return wet_indices
 
-    ##
-    # @brief
-    # @param indices
     def get_maximum_inundation_elevation(self, indices=None):
         """Return highest elevation where h > 0
@@ -458,7 +436,4 @@
                    get_maximum_value(indices=wet_elements)
 
-    ##
-    # @brief
-    # @param indices
     def get_maximum_inundation_location(self, indices=None):
         """Return location of highest elevation where h > 0
@@ -883,6 +858,4 @@
 #-----------------
 
-## @brief Compute fluxes and timestep suitable for all volumes in domain.
-# @param domain The domain to calculate fluxes for.
 def compute_fluxes(domain):
     """Compute fluxes and timestep suitable for all volumes in domain.
@@ -949,11 +922,12 @@
 ################################################################################
 
-##
-# @brief Wrapper for C version of extrapolate_second_order_sw.
-# @param domain The domain to operate on.
-# @note MH090605 The following method belongs to the shallow_water domain class
-#       see comments in the corresponding method in shallow_water_ext.c
 def extrapolate_second_order_sw(domain):
-    """Wrapper calling C version of extrapolate_second_order_sw"""
+    """Wrapper calling C version of extrapolate_second_order_sw.
+
+    domain  the domain to operate on
+
+    Note MH090605: The following method belongs to the shallow_water domain
+    class, see comments in the corresponding method in shallow_water_ext.c
+    """
 
     from shallow_water_ext import extrapolate_second_order_sw as extrapol2
@@ -980,7 +954,4 @@
               int(domain.optimise_dry_cells))
 
-##
-# @brief Distribution from centroids to vertices specific to the SWW eqn.
-# @param domain The domain to operate on.
 def distribute_using_vertex_limiter(domain):
     """Distribution from centroids to vertices specific to the SWW equation.
@@ -1040,7 +1011,4 @@
         Q.interpolate_from_vertices_to_edges()
 
-##
-# @brief Distribution from centroids to edges specific to the SWW eqn.
-# @param domain The domain to operate on.
 def distribute_using_edge_limiter(domain):
     """Distribution from centroids to edges specific to the SWW eqn.
@@ -1081,7 +1049,4 @@
         Q.interpolate_from_vertices_to_edges()
 
-##
-# @brief  Protect against infinitesimal heights and associated high velocities.
-# @param domain The domain to operate on.
 def protect_against_infinitesimal_and_negative_heights(domain):
     """Protect against infinitesimal heights and associated high velocities"""
@@ -1098,7 +1063,4 @@
             domain.epsilon, wc, zc, xmomc, ymomc)
 
-##
-# @brief Wrapper for C function balance_deep_and_shallow_c().
-# @param domain The domain to operate on.
 def balance_deep_and_shallow(domain):
     """Compute linear combination between stage as computed by
@@ -1142,8 +1104,4 @@
 ################################################################################
 
-##
-# @brief Apply gravitational pull in the presence of bed slope.
-# @param domain The domain to apply gravity to.
-# @note Wrapper for C function gravity_c().
 def gravity(domain):
     """Apply gravitational pull in the presence of bed slope
@@ -1167,8 +1125,4 @@
     gravity_c(domain.g, height, elevation, point, xmom_update, ymom_update)
 
-##
-# @brief Apply friction to a surface (implicit).
-# @param domain The domain to apply Manning friction to.
-# @note Wrapper for C function manning_friction_c().
 def manning_friction_implicit(domain):
     """Apply (Manning) friction to water momentum
@@ -1205,8 +1159,4 @@
     
 
-##
-# @brief Apply friction to a surface (explicit).
-# @param domain The domain to apply Manning friction to.
-# @note Wrapper for C function manning_friction_c().
 def manning_friction_explicit(domain):
     """Apply (Manning) friction to water momentum
@@ -1244,8 +1194,4 @@
 
 # FIXME (Ole): This was implemented for use with one of the analytical solutions
-##
-# @brief Apply linear friction to a surface.
-# @param domain The domain to apply Manning friction to.
-# @note Is this still used (30 Oct 2007)?
 def linear_friction(domain):
     """Apply linear friction to water momentum
Index: /trunk/anuga_core/source/anuga/shallow_water/sww_interrogate.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/sww_interrogate.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/sww_interrogate.py	(revision 8124)
@@ -14,34 +14,26 @@
 from anuga.abstract_2d_finite_volumes.neighbour_mesh import segment_midpoints
 
-##
-# @brief Get values for quantities interpolated to polyline midpoints from SWW.
-# @param filename Path to file to read.
-# @param quantity_names Quantity names to get.
-# @param polyline Representation of desired cross-section.
-# @param verbose True if this function is to be verbose.
-# @return (segments, i_func) where segments is a list of Triangle_intersection
-#         instances and i_func is an instance of Interpolation_function.
-# @note For 'polyline' assume absolute UTM coordinates.
+
 def get_interpolated_quantities_at_polyline_midpoints(filename,
                                                       quantity_names=None,
                                                       polyline=None,
                                                       verbose=False):
-    """Get values for quantities interpolated to polyline midpoints from SWW
-
-    Input:
-        filename - Name of sww file
-        quantity_names - Names of quantities to load
-        polyline: Representation of desired cross section - it may contain
-                  multiple sections allowing for complex shapes. Assume
-                  absolute UTM coordinates.
-                  Format [[x0, y0], [x1, y1], ...]
-
-    Output:
-        segments: list of instances of class Triangle_intersection
-        interpolation_function: Instance of class Interpolation_function
-
-
-      This function is used by get_flow_through_cross_section and
-      get_energy_through_cross_section
+    """Get values for quantities interpolated to polyline midpoints from SWW.
+
+    filename        path to file to read
+    quantity_names  quantity names to get
+    polyline        representation of desired cross-section
+                    may contain multiple sections allowing complex shapes
+                    assume UTM coordinates
+    verbose         True if this function is to be verbose
+
+    Returns (segments, i_func)
+    where segments is a list of Triangle_intersection instances
+      and i_func is an instance of Interpolation_function.
+
+    Note: For 'polyline' assume absolute UTM coordinates.
+
+    This function is used by get_flow_through_cross_section and
+    get_energy_through_cross_section.
     """
 
@@ -76,23 +68,18 @@
 
 
-##
-# @brief Obtain flow (m^3/s) perpendicular to specified cross section.
-# @param filename Path to file to read.
-# @param polyline Representation of desired cross-section.
-# @param verbose Trie if this function is to be verbose.
-# @return (time, Q) where time and Q are lists of time and flow respectively.
 def get_flow_through_cross_section(filename, polyline, verbose=False):
     """Obtain flow (m^3/s) perpendicular to specified cross section.
 
-    Inputs:
-        filename: Name of sww file
-        polyline: Representation of desired cross section - it may contain
-                  multiple sections allowing for complex shapes. Assume
-                  absolute UTM coordinates.
-                  Format [[x0, y0], [x1, y1], ...]
-
-    Output:
-        time: All stored times in sww file
-        Q: Hydrograph of total flow across given segments for all stored times.
+    filename  path to SWW file to read
+    polyline  representation of desired cross-section - it may contain
+              multiple sections allowing for complex shapes. Assume
+              absolute UTM coordinates.
+              Format [[x0, y0], [x1, y1], ...]
+    verbose   True if this function is to be verbose
+
+    Return (time, Q)
+    where time is a list of all stored times in SWW file
+      and Q is a hydrograph of total flow across given segments for all
+            stored times.
 
     The normal flow is computed for each triangle intersected by the polyline
@@ -147,11 +134,4 @@
 
 
-##
-# @brief Get average energy across a cross-section.
-# @param filename Path to file of interest.
-# @param polyline Representation of desired cross-section.
-# @param kind Select energy to compute: 'specific' or 'total'.
-# @param verbose True if this function is to be verbose.
-# @return (time, E) where time and E are lists of timestep and energy.
 def get_energy_through_cross_section(filename,
                                      polyline,
@@ -160,17 +140,17 @@
     """Obtain average energy head [m] across specified cross section.
 
-    Inputs:
-        polyline: Representation of desired cross section - it may contain
-                  multiple sections allowing for complex shapes. Assume
-                  absolute UTM coordinates.
-                  Format [[x0, y0], [x1, y1], ...]
-        kind:     Select which energy to compute.
-                  Options are 'specific' and 'total' (default)
-
-    Output:
-        E: Average energy [m] across given segments for all stored times.
-
-    The average velocity is computed for each triangle intersected by
-    the polyline and averaged weighted by segment lengths.
+    filename  path to file of interest
+    polyline  representation of desired cross-section - it may contain multiple
+              sections allowing for complex shapes. Assume absolute UTM
+              coordinates.  Format [[x0, y0], [x1, y1], ...]
+    kind      select energy to compute: 'specific' or 'total'
+    verbose   True if this function is to be verbose
+
+    Returns (time, E)
+    where time is a list of timestep
+      and E isaAverage energy [m] across given segments for all stored times.
+
+    The average velocity is computed for each triangle intersected by the
+    polyline and averaged weighted by segment lengths.
 
     The typical usage of this function would be to get average energy of
@@ -247,10 +227,4 @@
 
 
-##
-# @brief Return highest elevation where depth > 0.
-# @param filename Path to SWW file of interest.
-# @param polygon If specified resrict to points inside this polygon.
-# @param time_interval If specified resrict to within the time specified.
-# @param verbose True if this function is  to be verbose.
 def get_maximum_inundation_elevation(filename,
                                      polygon=None,
@@ -259,4 +233,12 @@
     """Return highest elevation where depth > 0
 
+    filename       path to SWW file containing ANUGA model output
+    polygon        if specified restrict to points inside this polygon
+    time_interval  if specified restrict to within the period specified
+    verbose        True if this function is  to be verbose
+
+    If no inundation is found within polygon and time_interval the return value
+    is None signifying "No Runup" or "Everything is dry".
+
     Usage:
     max_runup = get_maximum_inundation_elevation(filename,
@@ -265,12 +247,4 @@
                                                  verbose=False)
 
-    filename is a NetCDF sww file containing ANUGA model output.
-    Optional arguments polygon and time_interval restricts the maximum
-    runup calculation
-    to a points that lie within the specified polygon and time interval.
-
-    If no inundation is found within polygon and time_interval the return value
-    is None signifying "No Runup" or "Everything is dry".
-
     See general function get_maximum_inundation_data for details.
     """
@@ -283,10 +257,4 @@
 
 
-##
-# @brief Return location of highest elevation where h > 0
-# @param filename Path to SWW file to read.
-# @param polygon If specified resrict to points inside this polygon.
-# @param time_interval If specified resrict to within the time specified.
-# @param verbose True if this function is  to be verbose.
 def get_maximum_inundation_location(filename,
                                     polygon=None,
@@ -295,4 +263,12 @@
     """Return location of highest elevation where h > 0
 
+    filename       path to SWW file containing ANUGA model output
+    polygon        if specified restrict to points inside this polygon
+    time_interval  if specified restrict to within the period specified
+    verbose        True if this function is  to be verbose
+
+    If no inundation is found within polygon and time_interval the return value
+    is None signifying "No Runup" or "Everything is dry".
+
     Usage:
     max_runup_location = get_maximum_inundation_location(filename,
@@ -301,12 +277,4 @@
                                                          verbose=False)
 
-    filename is a NetCDF sww file containing ANUGA model output.
-    Optional arguments polygon and time_interval restricts the maximum
-    runup calculation
-    to a points that lie within the specified polygon and time interval.
-
-    If no inundation is found within polygon and time_interval the return value
-    is None signifying "No Runup" or "Everything is dry".
-
     See general function get_maximum_inundation_data for details.
     """
@@ -319,16 +287,18 @@
 
 
-##
-# @brief Compute maximum run up height from SWW file.
-# @param filename Path to SWW file to read.
-# @param polygon If specified resrict to points inside this polygon.
-# @param time_interval If specified resrict to within the time specified.
-# @param use_centroid_values 
-# @param verbose True if this function is to be verbose.
-# @return (maximal_runup, maximal_runup_location)
 def get_maximum_inundation_data(filename, polygon=None, time_interval=None,
                                 use_centroid_values=False,
                                 verbose=False):
     """Compute maximum run up height from sww file.
+
+    filename             path to SWW file to read
+    polygon              if specified resrict to points inside this polygon
+                         assumed absolute coordinates and in same zone as
+                         domain
+    time_interval        if specified resrict to within the period specified
+    use_centroid_values 
+    verbose              True if this function is to be verbose
+
+    Returns (maximal_runup, maximal_runup_location).
 
     Usage:
@@ -339,13 +309,6 @@
 
     Algorithm is as in get_maximum_inundation_elevation from
-    shallow_water_domain except that this function works with the sww file and
+    shallow_water_domain except that this function works with the SWW file and
     computes the maximal runup height over multiple timesteps.
-
-    Optional arguments polygon and time_interval restricts the maximum runup
-    calculation to a points that lie within the specified polygon and time
-    interval.
-
-    Polygon is assumed to be in (absolute) UTM coordinates in the same zone
-    as domain.
 
     If no inundation is found within polygon and time_interval the return value
Index: /trunk/anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water/test_shallow_water_domain.py	(revision 8124)
@@ -232,5 +232,5 @@
             pass
         else:
-            raise Exception, 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
     # Individual flux tests
@@ -2131,5 +2131,5 @@
         else:
             msg = 'Should have raised exception'
-            raise Exception, msg
+            raise Exception(msg)
 
     def Xtest_inflow_outflow_conservation(self):
@@ -4967,5 +4967,5 @@
         else:
             msg = 'This should have caught NAN at boundary'
-            raise Exception, msg
+            raise Exception(msg)
 
         #Cleanup
@@ -5505,5 +5505,5 @@
         except RuntimeError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception,(sg)
             # clean up in case raise fails
             os.remove(meshname)
@@ -5571,5 +5571,5 @@
         except AssertionError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception(msg)
             # Cleanup in case this failed
             os.remove(meshname)
@@ -5582,5 +5582,5 @@
         except AssertionError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception(msg)
             # Cleanup in case this failed
             os.remove(meshname)
Index: /trunk/anuga_core/source/anuga/shallow_water_balanced/swb_domain.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water_balanced/swb_domain.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water_balanced/swb_domain.py	(revision 8124)
@@ -203,5 +203,5 @@
                 #Q.extrapolate_second_order_and_limit_by_vertex()
             else:
-                raise 'Unknown order'
+                raise Exception('Unknown order: %s' % str(self._order_))
 
 
@@ -330,5 +330,5 @@
                 #Q.extrapolate_second_order_and_limit_by_vertex()
             else:
-                raise 'Unknown order'
+                raise Exception('Unknown order: %s' % str(self._order_))
 
 
Index: /trunk/anuga_core/source/anuga/shallow_water_balanced/test_swb_basic.py
===================================================================
--- /trunk/anuga_core/source/anuga/shallow_water_balanced/test_swb_basic.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/shallow_water_balanced/test_swb_basic.py	(revision 8124)
@@ -152,5 +152,5 @@
             pass
         else:
-            raise Exception, 'Should have raised an exception'
+            raise Exception('Should have raised an exception')
 
     # Individual flux tests
@@ -677,5 +677,5 @@
         else:
             msg = 'should have caught wrong time interval'
-            raise Exception, msg
+            raise Exception(msg)
 
         # Check correct time interval
@@ -768,5 +768,5 @@
         else:
             msg = 'Time interval should have raised an exception'
-            raise Exception, msg
+            raise Exception(msg)
 
         # Cleanup
@@ -1979,5 +1979,5 @@
         except RuntimeError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception(msg)
             # clean up in case raise fails
             os.remove(meshname)
@@ -2033,5 +2033,5 @@
         except AssertionError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception(msg)
             # Cleanup in case this failed
             os.remove(meshname)
@@ -2044,5 +2044,5 @@
         except AssertionError, e:
             msg = 'Test failed: %s' % str(e)
-            raise Exception, msg
+            raise Exception(msg)
             # Cleanup in case this failed
             os.remove(meshname)
Index: /trunk/anuga_core/source/anuga/utilities/compile.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/compile.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/utilities/compile.py	(revision 8124)
@@ -175,5 +175,5 @@
       msg += 'One way to check this is to run %s on ' %compiler
       msg += 'the commandline.'
-      raise Exception, msg    
+      raise Exception(msg)
 
   
@@ -192,8 +192,8 @@
     open(headerfile, 'r')
   except:
-    raise """Did not find Python header file %s.
+    raise Exception("""Did not find Python header file %s.
     Make sure files for Python C-extensions are installed. 
     In debian linux, for example, you need to install a
-    package called something like python2.3-dev""" %headerfile
+    package called something like python2.3-dev""" %headerfile)
 
 
@@ -243,10 +243,10 @@
       FN = FN + '.c'
     elif ext.lower() != '.c':
-      raise Exception, "Unrecognised extension: " + FN
+      raise Exception("Unrecognised extension: " + FN)
     
     try:
       open(FN, 'r')
     except:
-      raise Exception, "Could not open: " + FN
+      raise Exception("Could not open: " + FN)
 
     if not object_files: root1 = root  #Remember first filename        
@@ -293,7 +293,7 @@
       err = os.system(s)
       if err != 0:
-          raise 'Attempting to compile %s failed - please try manually' %FN 
+          raise Exception('Attempting to compile %s failed - please try manually' %FN)
     except:
-      raise 'Could not compile %s - please try manually' %FN  
+      raise Exception('Could not compile %s - please try manually' %FN)
 
   
@@ -314,7 +314,8 @@
     err=os.system(s)
     if err != 0:        
-        raise 'Attempting to link %s failed - please try manually' %root1     
+        raise Exception('Attempting to link %s failed - please try manually'
+                        % root1)
   except:
-    raise 'Could not link %s - please try manually' %root1
+    raise Exception('Could not link %s - please try manually' % root1)
     
 
@@ -352,5 +353,5 @@
                     msg = 'C extension %s seems to compile OK, '
                     msg += 'but it can still not be imported.'
-                    raise msg
+                    raise Exception(msg)
                 else:
                     C=True
@@ -441,5 +442,5 @@
               msg = 'Could not compile C extension %s\n' %filename
               msg += str(e)
-              raise Exception, msg
+              raise Exception(msg)
           else:
               print 'C extension %s OK' %filename
Index: /trunk/anuga_core/source/anuga/utilities/sparse.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/sparse.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/utilities/sparse.py	(revision 8124)
@@ -22,5 +22,5 @@
                 A = num.array(args[0])
             except:
-                raise 'Input must be convertable to a numeric array'
+                raise Exception('Input must be convertable to a numeric array')
 
             assert len(A.shape) == 2, 'Input must be a 2d matrix'
@@ -37,5 +37,5 @@
             self.N = args[1]
         else:
-            raise 'Invalid construction'
+            raise Exception('Invalid construction')
             
         self.shape = (self.M, self.N) 
@@ -112,5 +112,5 @@
         except:
             msg = 'FIXME: Only numeric types implemented so far'
-            raise msg
+            raise Exception(msg)
             
 
@@ -150,5 +150,5 @@
 	    
         else:
-            raise ValueError, 'Dimension too high: d=%d' %len(B.shape)
+            raise ValueError('Dimension too high: d=%d' %len(B.shape))
 
         return R
@@ -176,5 +176,5 @@
         except:
             msg = 'Sparse matrix can only "right-multiply" onto a scalar'
-            raise TypeError, msg
+            raise TypeError(msg)
         else:
             new = self.copy()
@@ -214,5 +214,5 @@
 
         else:
-            raise 'Can only multiply with 1d array'
+            raise Exception('Can only multiply with 1d array')
 
         return R
@@ -271,5 +271,5 @@
             self.N       = A.N
         else:
-            raise ValueError, "Sparse_CSR(A) expects A == Sparse Matrix"
+            raise ValueError("Sparse_CSR(A) expects A == Sparse Matrix")
             
     def __repr__(self):
Index: /trunk/anuga_core/source/anuga/utilities/test_file_utils.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/test_file_utils.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/utilities/test_file_utils.py	(revision 8124)
@@ -62,5 +62,5 @@
             pass
         else:
-            raise 'Should have raised exception' 
+            raise Exception('Should have raised exception')
         
     def test_get_all_swwfiles1(self):
Index: /trunk/anuga_core/source/anuga/utilities/test_numerical_tools.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/test_numerical_tools.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/utilities/test_numerical_tools.py	(revision 8124)
@@ -273,5 +273,5 @@
                 compile(FN)
             except:
-                raise 'Could not compile %s' %FN
+                raise Exception('Could not compile %s' % FN)
             else:
                 import util_ext
Index: /trunk/anuga_core/source/anuga/utilities/test_sparse.py
===================================================================
--- /trunk/anuga_core/source/anuga/utilities/test_sparse.py	(revision 8123)
+++ /trunk/anuga_core/source/anuga/utilities/test_sparse.py	(revision 8124)
@@ -148,5 +148,5 @@
             pass
         else:
-            raise 'Should have failed'
+            raise Exception('Should have failed')
 
     def test_sparse_addition(self):
