I catch ctrl-c with a signal handler and wonder if there is a better way to hide ^ C, which is printed to the terminal, than go os.system ("\ b") or similar. I really really care about Unix.
def read(self, time_s):
setup = ['Sensor', 'sensors', '\x00']
def sigintHandler(*args):
self.close()
sys.stdout.write('\b\b\r')
sys.stdout.flush()
sys.exit(0)
signal.signal(signal.SIGINT,sigintHandler)
Edit
My current solution is higher
chris source
share