Handle KeyboardInterrupts in tweet.py

This commit is contained in:
Klaus-Uwe Mitterer 2016-03-18 21:09:50 +01:00
parent ea13238049
commit fab54d15cd
1 changed files with 11 additions and 0 deletions

11
tweet.py Executable file
View File

@ -0,0 +1,11 @@
#!/usr/bin/env python3
import twitools
if __name__ == "__main__":
two = twitools.twObject()
try:
text = input("> ")
except KeyboardInterrupt:
exit(0)
two.tweet(text)