From: Cédric Aguerre Date: Wed, 2 Nov 2016 10:24:58 +0000 (+0100) Subject: salome info --sotwares: can provide a list of softwares X-Git-Tag: V8_2_0a1^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3fabfdb978483c008352c1b5b03d632f559c5a79;p=modules%2Fkernel.git salome info --sotwares: can provide a list of softwares --- diff --git a/bin/salomeContext.py b/bin/salomeContext.py index bc963fff1..71f3aea55 100644 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -447,10 +447,12 @@ class SalomeContext: epilog = """\n Display some information about SALOME.\n Available options are: - -p,--ports Show the list of busy ports (running SALOME instances). - -s,--softwares Show the list and versions of SALOME softwares. - -v,--version Show running SALOME version. - -h,--help Show this message. + -p,--ports Show the list of busy ports (running SALOME instances). + -s,--softwares [software(s)] Show the list and versions of SALOME softwares. + Software names must be separated by blank characters. + If no software is given, show version of all softwares. + -v,--version Show running SALOME version. + -h,--help Show this message. """ if not args: args = ["--version"] @@ -467,7 +469,14 @@ Available options are: print "Last started instance on port %s"%ports[-1] if "-s" in args or "--softwares" in args: - self._showSoftwareVersions() + if "-s" in args: + index = args.index("-s") + else: + index = args.index("--softwares") + indexEnd=index+1 + while indexEnd < len(args) and args[indexEnd][0] != "-": + indexEnd = indexEnd + 1 + self._showSoftwareVersions(softwares=args[index+1:indexEnd]) if "-v" in args or "--version" in args: print "Running with python", platform.python_version()