From: adam Date: Thu, 7 Apr 2011 13:10:40 +0000 (+0000) Subject: desactivate foreground() for X-Git-Tag: V6_3_0a1~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d770abe20bf796c422639a3c4e330da344eada39;p=modules%2Fkernel.git desactivate foreground() for o runSalome --pinter option o python -i runSalome.py use case --- 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