def saveLogfile(errorLog, runtimeLog): FILE_NAME = 'upd_frame' proc = 'saveLogfile()' lines = [] fileName_2 = FILE_NAME + '_2.py' remove1(fileName_2) cmd = [sys.executable, fileName_2, errorLog] if localTest: ret = upd_frame.Main1(cmd) remove1(fileName_2) return 1 #endif if not Basic.readUrl2(FILE_NAME + '.py', fileName_2): return 0 try: lines = Basic.systemCmd(cmd) ret = 1 for s in lines: if '#abort#' in s: ret = 2 break except: ret = 0 remove1(fileName_2) return ret
def execsemblance(nostat, nsamp, i, nstep, dimX,dimY, mint, new_freq, minSampleCount) : f = [nostat, nsamp, i, nstep, dimX,dimY, mint, new_freq, minSampleCount] args = Basic.floatToString(f, delim= ',') prog = sys.executable + ' ' + __file__ cmd = prog + ' ' + args Logfile.add('--------------------------------------------', cmd) result = Basic.systemCmd(cmd) Logfile.addLines(result) backSemb = Basic.readVector(semb_txt) return backSemb