What is raw REPL
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
What is raw REPL
help() says one can use CTRL-A to enter 'raw REPL'. If I do this, the >>> prompt changes to > but I wonder how to use raw REPL or what it is?
Re: What is raw REPL
Raw REPL allows python code to be entered and executed on the board from a script.
The pyboard.py script uses this to download code and run it.
Right now this is primarily used as part of the test suite for running tests on the board, but it could be useful for development as well.
The pyboard.py script uses this to download code and run it.
Right now this is primarily used as part of the test suite for running tests on the board, but it could be useful for development as well.
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
Re: What is raw REPL
I see. But what's the advantage of putting the REPL in raw mode and sending the text as bytes(), compared to using the normal REPL and sending the text as text? Is it to get rid of the echoed back characters?
Re: What is raw REPL
Primarily - yeah. You can think of raw REPL as a programmatic interface, and regular REPL as a human interface.Markus Gritsch wrote:I see. But what's the advantage of putting the REPL in raw mode and sending the text as bytes(), compared to using the normal REPL and sending the text as text? Is it to get rid of the echoed back characters?
The raw REPL also makes it much easier (from the script's perspective) to determine exactly what the real output of a command (like print) is.
- Markus Gritsch
- Posts: 41
- Joined: Fri May 16, 2014 9:04 pm
Re: What is raw REPL
ok. Thank you for the quick and detailed answer!