From d770abe20bf796c422639a3c4e330da344eada39 Mon Sep 17 00:00:00 2001 From: adam Date: Thu, 7 Apr 2011 13:10:40 +0000 Subject: [PATCH] desactivate foreground() for o runSalome --pinter option o python -i runSalome.py use case --- bin/runSalome.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/bin/runSalome.py b/bin/runSalome.py index 3bcd64c36..df2f47ee5 100755 --- a/bin/runSalome.py +++ b/bin/runSalome.py @@ -1010,7 +1010,22 @@ if __name__ == "__main__": # -- test = args['gui'] and args['session_gui'] test = test or args['wake_up_session'] + # -- + # The next test covers the --pinter option or var PYTHONINSPECT setted + # -- + test = test and not os.environ.get('PYTHONINSPECT') + # -- + # The next test covers the python -i $KERNEL_ROOT_DIR/bin/salome/runSalome.py case + # -- + try: + from ctypes import POINTER, c_int, cast, pythonapi + iflag_ptr = cast(pythonapi.Py_InteractiveFlag, POINTER(c_int)) + test = test and not iflag_ptr.contents.value + except: + pass + # -- test = test and os.getenv("SALOME_TEST_MODE", "0") != "1" + # -- if test: foreGround(clt, args) pass -- 2.39.2