1 // Copyright (C) 2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Author : Anthony Geay (EDF R&D)
24 def ExtensionsStr(sz=60):
26 isOK=[(elt,tab[int(elt in ActiveExtensions())]) for elt in AllPossibleExtensions()]
27 return "\n".join([a+" "+('{:.>%d}'%(sz-len(a)-1)).format(' %s'%b) for a,b in isOK])
29 def ShowExtensions(sz=60):
30 print(ExtensionsStr(sz))
33 def AdvancedExtensionsStr(sz=60):
34 def SubExtension(allPossibilities,extensionsActivated,pad,tab, sts):
35 for elt2 in allPossibilities:
36 elt3="%s algorithm for %s"%(elt2,elt)
37 sts.append(pad+elt3+" "+('{:.>%d}'%(sz-len(pad)-len(elt3)-1)).format(' %s'%tab[int(elt2 in extensionsActivated)]))
42 aext=ActiveExtensions()
44 for elt in AllPossibleExtensions():
46 sts.append(elt+" "+('{:.>%d}'%(sz-len(elt)-1)).format(' %s'%tab[isOK]))
50 SubExtension(AllRenumberMethods(),RenumberAvailableMethods(),pad,tab, sts)
53 SubExtension(MEDPartitioner.AllAlgorithms(),MEDPartitioner.AvailableAlgorithms(),pad,tab, sts)
58 def ShowAdvancedExtensions(sz=60):
59 print(AdvancedExtensionsStr(sz))