keyboard handle

This commit is contained in:
Christoph J. Scherr 2023-09-14 17:45:13 +02:00
parent 502851d027
commit 2e39e89f37
1 changed files with 6 additions and 1 deletions

View File

@ -135,4 +135,9 @@ def main():
file.close()
if __name__ == "__main__":
# when called directly (like executed from shell)
try:
main()
except KeyboardInterrupt:
# no need for an exception when the user presses ctrl c.
sys.exit(0)