def wrapper(*args, **kwargs): old_batch = idc.batch(1) try: val = func(*args, **kwargs) except Exception: raise finally: idc.batch(old_batch) return val
def Assemble(ea, line): """ Assembles one or more lines (does not display an message dialogs) If line is a list then this function will attempt to assemble all the lines This function will turn on batch mode temporarily so that no messages are displayed on the screen @param ea: start address @return: (False, "Error message") or (True, asm_buf) or (True, [asm_buf1, asm_buf2, asm_buf3]) """ old_batch = idc.batch(1) ret = _Assemble(ea, line) idc.batch(old_batch) return ret
def batch(num): if idaapi.IDA_SDK_VERSION <= 699: idc.Batch(num) else: idc.batch(num)
def wrapper(*args, **kwargs): old_batch = idc.batch(1) try: return func(*args, **kwargs) finally: idc.batch(old_batch)