How to clear console programmatically


#1

Hi guys,

is there a way to clear the Console output windows from with a python script at the start? I use the logging via:

#@LogService log
log.info('Filename: ' + FILENAME.toString())
...

It would be nice if I clear that window everytime automatically.

Sebi


#2

Hi @sebi06,

the following should work:

#@UIService uiService
#@LogService log
uiService.getDefaultUI().getConsolePane().clear();
log.info("Something")

Best,
Stefan


#3

Perfect!

Thanks, Sebi