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
--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)
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
# now modify SalomeAppConfig environment variable
print " --- registered objects tree in Naming Service ---"
clt.showNS()
+ # run python scripts, passed via -t option
+ toimport = args['pyscript']
+ i = 0
+ while i < len( toimport ) :
+ if toimport[ i ] == 'killall':
+ print "killall : option disabled"
+ #killAllPorts()
+ else:
+ print 'importing',toimport[ i ]
+ doimport = 'import ' + toimport[ i ]
+ exec doimport
+ i = i + 1
+
return clt
# -----------------------------------------------------------------------------