Replies: 3 comments 2 replies
|
Hi, I've asked your question to ChatGPT and after a lot of tries concerning stdin (=console) in Pythonista, it gave this code which is working. |
0 replies
|
I think try:
name = input("Enter your name: ")
except KeyboardInterrupt:
print("Interrupted")Press Ctrl+C to raise |
0 replies
|
@cvpe : I can't get that working in Pythonista, at least using some variant keyboard entry |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I am doing a Harvard course on Python and they are using “except EOFError:” to terminate a program using a Ctrl+D.
Ctrl+D works fine on python on my PC and in visual studio browser environment (used by the Harvard course) but it doesn’t work in any combination that I can figure in Pythonista. I can see that the EOFError exception is supported.
Any ideas?
All reactions