21 lines
500 B
Python
21 lines
500 B
Python
opus.main = Munch()
|
|
|
|
def _mainOutput(msg,verbosity = 0):
|
|
if opus.verbosity > verbosity - 1:
|
|
print(msg)
|
|
|
|
with open("opus-nt-" +str(opus.time)+ ".log","a") as file:
|
|
file.write(msg + "\n")
|
|
opus.main.output = _mainOutput
|
|
|
|
opus.script = Munch()
|
|
def _mainExecPy(_scriptPath):
|
|
opus.main.output("script -> execute -> " +_scriptPath,1)
|
|
|
|
_return = True
|
|
with open(_scriptPath) as _scriptFile:
|
|
exec(_scriptFile.read())
|
|
|
|
opus.main.output("done.",2)
|
|
return _return
|
|
opus.script.execute = _mainExecPy |