[Snek] mu, network REPL, echoing
Misha Gusarov
dottedmag at dottedmag.net
Sun Oct 11 04:33:19 PDT 2020
Hi Keith,
On 11 Oct 2020, at 3:40, Keith Packard wrote:
> It could? But the USB serial Snek instances all handle echo and erase
> stuff inside the device, so presumably the EV3 port should as well?
>
> You'll find the echo and erase code in 'snek-io.c', which gets hooked
> up
> in stdio for the avrlibc and picolibc ports, and as SNEK_GETC for the
> esp32 port. Lots of options for how to connect things up here :-)
Oh, now it all makes sense.
So it follows ev3 port ought to have three modes:
- Non-interactive, reading script from stdin or a file
- Interactive, terminal. Leaves echoing and line editing to the
terminal, handles prompt.
- Interactive, remote. Hadles echoing, line editing, prompt.
Sounds about right?
Non-interactive is selected by passing a filename. Should "remote" be
selected
by testing for absence of controlling tty, os is it better to have an
option
to enable it?
snekserver will then pass this option.
Best,
Misha.
More information about the Snek
mailing list