accept EOF as valid reason to end
This commit is contained in:
parent
b3e7c9c3ef
commit
9fc84b8241
|
@ -65,7 +65,7 @@ if __name__ == '__main__':
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
text = input("comment# ")
|
text = input("comment# ")
|
||||||
except KeyboardInterrupt:
|
except (KeyboardInterrupt, EOFError):
|
||||||
text = 'exit'
|
text = 'exit'
|
||||||
print(text)
|
print(text)
|
||||||
if text == 'exit':
|
if text == 'exit':
|
||||||
|
|
Loading…
Reference in New Issue