Salome HOME
PR: ROOT_DIR to virtual link = APPLI directory
[modules/kernel.git] / bin / launchConfigureParser.py
index c3f8222c3841e15c9dcb9246b51a9271b24e21c0..f1ae79eaaefdcaacd505ef7126e9909472c16b18 100755 (executable)
@@ -53,6 +53,7 @@ plugins_nam    = "plugins"
 appname_nam    = "appname"
 port_nam       = "port"
 appname        = "SalomeApp"
+script_nam     = "pyscript"
 
 # values of boolean type (must be '0' or '1').
 # xml_parser.boolValue() is used for correct setting
@@ -253,7 +254,7 @@ for dir in dirs:
 
 # SalomeApprc file in user's catalogue
 filename = userFile()
-if filename and not os.path.exists(filename):
+if not filename or not os.path.exists(filename):
     print "Configure parser: Warning : could not find user configuration file"
 else:
     try:
@@ -362,6 +363,8 @@ if cmd_opts.has_key("h"):
     --help or -h                  : print this help
     --gui or -g                   : launching with GUI
     --terminal -t                 : launching without gui (to deny --gui)
+    or -t=PythonScript[,...]
+                                  : import of PythonScript(s)
     --logger or -l                : redirect messages in a CORBA collector
     --file=filename or -f=filename: redirect messages in a log file
     --xterm or -x                 : execute servers in xterm console (messages appear in xterm windows)
@@ -427,8 +430,14 @@ if not cmd_opts.has_key( "m" ) and os.getenv( "SALOME_MODULES" ):
     pass
 
 # 'terminal' must be processed in the end: to deny any 'gui' options
+args[script_nam] = []
 if 't' in cmd_opts:
     args[gui_nam] = 0
+    args[script_nam] = cmd_opts['t']
+    pass
+
+if args[except_nam] == 1:
+    os.environ["DISABLE_FPE"] = "1"
     pass
 
 # now modify SalomeAppConfig environment variable