def track_code(): try: (changed, newresult) = pari_eval.get_result(code_entry.get_text()) if changed: result_buffer.set_text(newresult) except: msg = "Exception: " msg += str(sys.exc_info()[0]) msg += ": " msg += str(sys.exc_info()[1]) result_buffer.set_text(msg) return True
def paste(*arguments): pari_eval.get_result(code_entry.get_text()) pari_eval.wait_for_result() (changed, result) = pari_eval.get_result(code_entry.get_text()) print(result) window.hide()