keyboard handle
This commit is contained in:
parent
502851d027
commit
2e39e89f37
|
@ -135,4 +135,9 @@ def main():
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
# when called directly (like executed from shell)
|
||||||
|
try:
|
||||||
main()
|
main()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
# no need for an exception when the user presses ctrl c.
|
||||||
|
sys.exit(0)
|
||||||
|
|
Loading…
Reference in New Issue