args["ns_port_log_file"] = cmd_opts.ns_port_log_file
# Study files
- if len(cmd_args) > 0 and not args["study_hdf"]:
- arg = cmd_args[0] # :NOTE: only look at first element
- if arg[-4:] == ".hdf":
+ for arg in cmd_args:
+ if arg[-4:] == ".hdf" and not args["study_hdf"]:
args["study_hdf"] = arg
# Python scripts
if elt[-3:] == ".py":
currentScript = os.path.abspath(elt)
else:
- currentScript = os.path.abspath(elt+".py")
- if callPython:
+ currentScript = None
+ if elt[-4:] != ".hdf":
+ currentScript = os.path.abspath(elt+".py")
+ if currentScript and callPython:
currentKey = "python "+currentScript
scriptArgs.append({currentKey:[]})
callPython = False
- else:
+ elif currentScript:
if not os.access(currentScript, os.X_OK):
currentKey = "python "+currentScript
scriptArgs.append({currentKey:[]})