标签:ctr 方法 exit bsp 恢复 name ons class ==
if __name__ == ‘__main__‘: # Make it possible to exit application with ctrl+c on console signal.signal(signal.SIGINT, signal.SIG_DFL)
其中信号SIGINT由按下Ctrl-C发出
Get a signal -SIGINT //按下Ctrl-C得到的结果
SIG_DFL:恢复参数signum所指信号的处理方法为默认值。
标签:ctr 方法 exit bsp 恢复 name ons class ==
原文地址:https://www.cnblogs.com/yibeimingyue/p/11247348.html