X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FSMESH%2Fcollect_mesh_methods.py;h=da53d4ee664ee6afb9f162bc1dd5e1e58a57d382;hp=6e2b7a4813de48ed600369c7a3efd6b71b5008a3;hb=442fd64c19a6e27a339ca36264c15ec91732cf32;hpb=5d68554076bbca0e1e95fb0db215a6c2b84b6c54 diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 6e2b7a481..da53d4ee6 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: iso-8859-1 -*- -# Copyright (C) 2012-2014 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