As a beginner I'm trying to use IDC to clear output window in IDA Pro,but I don't know which function will work.
My IDA Pro version is 6.1.
Easy
form = idaapi.find_tform("Output window")
idaapi.switchto_tform(form, True);
idaapi.process_ui_action("msglist:Clear");
I don't think there is one, so I tend to Ctrl-X in the console window, which is the same as right-clicking and picking Clear from the context menu, before running my IDC scripts.
form = idaapi.find_widget("Output window")
idaapi.activate_widget(form, True)
idaapi.process_ui_action("msglist:Clear")
print('---------------IDA Python Running at {}---------------------'.format(datetime.datetime.now()))
This answer is only one i found online, and its inefficient and potentially problematic when you writing plugin since focus is shifted to another tab...
Simply use ida_kernwin.msg_clear()