Stop current Python REPL command, but keep REPL session open?

  • Context: Python 
  • Thread starter Thread starter Swamp Thing
  • Start date Start date
  • Tags Tags
    Python
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
Swamp Thing
Insights Author
Messages
1,065
Reaction score
821
If you just typed in a command into the Python repl, and it is stuck in a synchronous "waiting-for-something-to-happen", how can we terminate just that command and return to the same repl session?

For example, say we typed websocket.recv() and the websocket is waiting for a message... how can we end that and get back to the repl prompt without losing the whole session?
 
Physics news on Phys.org