How to catch the Sikuli keyboard interrupt Alt+Shift+C
I want to know how to catch the Sikuli keyboard interrupt Alt+Shift+C for logging. This would allow me to close the logging file if I kill the Sikuli program with the keyboard interrupt.
I use the following to start and stop logging:
def startLogging(
# used to initialize & format a logfile for this module
logger.
logger.
formatter = logging.
hdlr.
logger.
return
def stopLogging(logger, hdlr, logName):
# use to gracefully shutdown the logfile for this module
logger.
logger.
hdlr.flush()
hdlr.close()
return
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: