From: crouzet Date: Fri, 6 Sep 2019 12:26:03 +0000 (+0200) Subject: sat #17639 : message de warning lorsque sat est utilisé avec python3 X-Git-Tag: 5.5.0~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=51ba1ceaeef78d62085cef415e6541b31f5e0256;p=tools%2Fsat.git sat #17639 : message de warning lorsque sat est utilisé avec python3 --- diff --git a/sat b/sat index 7355399..921aab8 100755 --- a/sat +++ b/sat @@ -24,6 +24,7 @@ in mode Command Line Argument(s) (CLI) import os import sys +import platform # exit OKSYS and KOSYS seems equal on linux or windows OKSYS = 0 # OK @@ -50,6 +51,11 @@ DBG.write("Python version", sys.version, DBG.isDeveloper()) # MAIN ################################# if __name__ == "__main__": + if platform.python_version()[0]=="3": + msg_py3="sat is used with python 3!! It is not designed for!\n"\ + "Please check you environment.\n"\ + "sat should be used with a (native) python 2 version." + logger.warning(msg_py3) from src.salomeTools import Sat # it is time to do import args = sys.argv[1:] # skip useless "sat'