From: Ovidiu MIRCESCU Date: Thu, 15 Jul 2021 10:35:03 +0000 (+0200) Subject: Add sessionless option to salome command. X-Git-Tag: V9_8_0a1~38^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4227af90e2adce576ca3b2880b8330333f3ce555;p=modules%2Fkernel.git Add sessionless option to salome command. --- diff --git a/bin/runSalomeNoServer.py b/bin/runSalomeNoServer.py index 6e6ee91f8..0305716a8 100755 --- a/bin/runSalomeNoServer.py +++ b/bin/runSalomeNoServer.py @@ -31,8 +31,11 @@ class NoSessionServer(runSalome.SessionServer): SalomeAppSLConfig=os.getenv("SalomeAppConfig","") os.putenv("SalomeAppSLConfig", SalomeAppSLConfig) -if __name__ == "__main__": +def main(): args, modules_list, modules_root_dir = setenv.get_config() mySessionServ = NoSessionServer(args, modules_list, modules_root_dir) mySessionServ.setpath(modules_list, modules_root_dir) mySessionServ.run() + +if __name__ == "__main__": + main() diff --git a/bin/salomeContext.py b/bin/salomeContext.py index d4d44afdd..32543205e 100755 --- a/bin/salomeContext.py +++ b/bin/salomeContext.py @@ -224,6 +224,7 @@ class SalomeContext: availableCommands = { 'start' : '_runAppli', + 'sessionless' : '_sessionless', 'context' : '_setContext', 'shell' : '_runSession', 'remote' : '_runRemote', @@ -358,6 +359,14 @@ class SalomeContext: return 0 # + def _sessionless(self, args=None): + if args is None: + args = [] + sys.argv = ['runSalome'] + args + import runSalomeNoServer + runSalomeNoServer.main() + # + def _setContext(self, args=None): salome_context_set = os.getenv("SALOME_CONTEXT_SET") if salome_context_set: