Greetings fellow developers.
I have a 'super loop' in jython (ie, while True: ) that does not take input from the user at any point. It simply runs as a psuedo-daemon in the background. I was figuring out how to play around with the signal module in python to have a way to gracefully exit the application (without having to close the command prompt that it's running in). When I exit the application I would like to print a line to my log file that simply gives the time and says, exiting application, among cleaning up certain things.
Jython doesn't allow you to use the signal module... :( I'm not quite sure where to go with this one. Does anybody have any ideas about how to exit out of a super loop in Jython, or perhaps a module that will allow me to intercept a CTRL-C or similar keystroke?!?
Thanks in advance to anyone that can help
I have a 'super loop' in jython (ie, while True: ) that does not take input from the user at any point. It simply runs as a psuedo-daemon in the background. I was figuring out how to play around with the signal module in python to have a way to gracefully exit the application (without having to close the command prompt that it's running in). When I exit the application I would like to print a line to my log file that simply gives the time and says, exiting application, among cleaning up certain things.
Jython doesn't allow you to use the signal module... :( I'm not quite sure where to go with this one. Does anybody have any ideas about how to exit out of a super loop in Jython, or perhaps a module that will allow me to intercept a CTRL-C or similar keystroke?!?
Thanks in advance to anyone that can help
Comment