Skip to content
Discussion options

You must be logged in to vote

Disabling keyboard interrupt at runtime may be sufficient for you. That's done by

import micropython
micropython.kbd_int(-1)

Re-seting Ctrl-C as interrupt can be done with
micropython.kbd_intr(3)
A transparent IO with stdin ot stdout can be done with sys.stdin.buffer.read() and sys.stdout.buffer.write().

Edit: You cannot test micropython.kbd_int(-1) ni RELP, because REPL re-enables keyboard interrupt for each prompt.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by jonnor
Comment options

You must be logged in to vote
2 replies
@scruss
Comment options

@ksprs
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants