X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FVerima%2FBase%2Fversions.py;h=7936dc3eada6c84dac8efcb89bc5108979b4c919;hp=55cea45a17caa78853edd9c4ce075c24a2e4a07e;hb=ab46000ce37681e966a28f5e9276420d01df78bd;hpb=442fd64c19a6e27a339ca36264c15ec91732cf32 diff --git a/src/Tools/Verima/Base/versions.py b/src/Tools/Verima/Base/versions.py index 55cea45a1..7936dc3ea 100755 --- a/src/Tools/Verima/Base/versions.py +++ b/src/Tools/Verima/Base/versions.py @@ -1,5 +1,22 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 +# Copyright (C) 2013-2020 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# import sys import os @@ -7,12 +24,12 @@ import subprocess def Chercheversion(salomePath): - home=os.environ['HOME'] - commande=os.path.abspath(os.path.join(home,salomePath,'runAppli')) + home=os.path.expanduser("~") + commande=os.path.abspath(os.path.join(home,salomePath,'salome')) argus="--version" p = subprocess.Popen([commande,argus], stdout=subprocess.PIPE) (output, err) = p.communicate() - version=' '.join(output.split()) + version=' '.join(output.decode().split()) return version