Salome HOME
Merge branch 'V8_3_BR' into ngr/python3_dev
[modules/smesh.git] / doc / salome / gui / SMESH / collect_mesh_methods.py
index 0d55a3c74c2b0865d4f992197c1cd98e43b39b96..da53d4ee664ee6afb9f162bc1dd5e1e58a57d382 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2012-2015  CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2012-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -31,7 +31,7 @@
 # class.
 # 
 # This script is intended for internal usage - only
-# for generatation of the extra developer documentation for
+# for generation of the extra developer documentation for
 # the meshing plug-in(s).
 # 
 # Usage:
@@ -46,6 +46,7 @@
 #
 ################################################################################
 
+import inspect
 import sys
 
 def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"):
@@ -59,7 +60,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"):
         for attr in dir( mod ):
             if attr.startswith( '_' ): continue
             algo = getattr( mod, attr )
-            if type( algo ).__name__ == 'classobj' and hasattr( algo, "meshMethod" ):
+            if inspect.isclass(algo) and hasattr(algo, "meshMethod"):
                 method = getattr( algo, "meshMethod" )
                 if method not in methods: methods[ method ] = []
                 methods[ method ].append( algo )
@@ -116,8 +117,8 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py"):
             f.close()
             pass
         pass
-    except Exception, e:
-        print e
+    except Exception as e:
+        print(e)
         pass
     pass