wiki-grav/pages/04.other/12.python/default.en.md

14 lines
210 B
Markdown
Raw Normal View History

---
title: Python
---
[toc]
## Exit on Keyboard Interrupt
```
try:
<put your code here>
except KeyboardInterrupt:
<stuff that needs to be done before exiting>
# return SIGINT code
exit(130)
```