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

16 lines
225 B
Markdown

---
title: Python
visible: true
---
[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)
```