Interrupt pyexec_raw_repl() and pyexec_friendly_repl() #9989
Replies: 1 comment 7 replies
-
If I understand what you're asking, you'd like a way for something that was invoked from the REPL to cause the REPL to exit (similar to as if they'd hit Ctrl-D). I'm not sure what you mean by "from inside main.c" though. I think the thing to look at is the handling of SystemExit in pyexec.c. By default SystemExit doesn't cause the REPL loop to terminate, but you can configure this with the Note that user code can intercept SystemExit, but see #9949 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Wondering if anyone has any ideas of how I might interrupt the pyexec_raw_repl() and pyexec_friendly_repl() from inside main.c. I would like the firmware to exit the pyexec_friendly_repl() when another control function is invoked but can't seem to figure out how to interrupt the REPL function. Here is the section of code from main.c in the rp2 port.
Beta Was this translation helpful? Give feedback.
All reactions