def ShowFunction(): funcList = ESI.ReadFunc() tmpIndexFuncShow = 1 for func in funcList: print str(tmpIndexFuncShow) + ")" + " " + str(func) tmpIndexFuncShow += 1
else: if addedUndef in ESI.ReadUndef(): print ESI.WriteLog( "You are adding a unknown that exist in the unknown list") else: ESI.WriteUndef(addedUndef) #添加函数 elif cmd == "addFunc": print "Enter your function here:" addedFunc = raw_input("f(x) = ") if ESC.CheckEquation_equa(addedFunc) != 0: ESI.WriteLog("Try to add function: " + addedFunc) ESI.WriteLog(ESW.Warn("excessiveEquater")) else: if ESFC.PurifyEquation(addedFunc) in ESI.ReadFunc(): print ESI.WriteLog( "You are adding a function that exist in the function list" ) else: #在写入堆栈的时候将等式去空格,初步格式化 addedFunc = ESFC.PurifyEquation(addedFunc) ESI.WriteFunc(addedFunc) print ESI.WriteLog("Add function: " + addedFunc) #显示所有的方程 elif cmd == "showEqua": print "Equations:" ShowEquation() print "Unknown numbers:" ShowUnknown()