← index #4196PR #609
Off-topic · high · value 0.282
QUERY · ISSUE

BUG -- initial prompt on WebREPL connect is always ">>> ", even for paste (and raw) mode

openby Hermann-SWopened 2018-09-28updated 2018-09-28

If bringing MicroPython into paste mode and disconnecting then, initial prompt on next WebREPL connect is wrong. The prompt is ">>> " although MicroPython is in paste mode as can be seen in screenshot. Initial prompt on connect is wrong as well if the module gets into raw mode (eg. by screen session). Initial prompt on WebREPL connect then is ">>> " as well.

Since MicroPython should know its mode on connect, it should present the correct initial prompt:
<img src="https://stamm-wilbrandt.de/en/forum/webrepl.initial_prompt.wrong.png"/>

CANDIDATE · PULL REQUEST

micropython/aiorepl: Add paste mode and raw repl.

closedby Carglglzopened 2023-02-08updated 2023-12-23

This adds a paste mode to aiorepl and a "raw REPL" mode to enable compatibility with MicroPython development tools .e.g pyboard.py/mpremote and other tools that use the raw REPL mode to communicate with the device.

4 comments
dpgeorge · 2023-12-23

Sorry I didn't see this! It got superseded by #756.

Carglglz · 2023-12-23

Don't worry #756 had more features than this one, also I think that it's worth exploring the idea of developing an
_aiorepl C module to get it working as close as normal REPL/raw REPL (e.g. autocompletion, ; chained commands, etc)

andrewleech · 2023-12-23

I also must apologize, I didn't know of this work you'd done before I started mine, if nothing else I'd prefer to have built in top of yours rather than writing from scratch!

While working on this space I did look at just exposing the C code rather than re-writing in python, but the structure of how repl works was making this surprisingly difficult!

Maybe it is still worth breaking out smaller chunks to use, but that does at the flash overhead of said python interface code that everyone gets regardless of whether they use aiorepl.
I'd be keen to figure out a way to make the built in repl able to be re-run in async.

This modded micropython apparently has some async support in the repl, but it's all mashed into the one mega-commit, I haven't looked into exactly what's been done with the repl:
https://github.com/gneverov/micropythonrt

andrewleech · 2023-12-23

I also just apologize, I didn't know of this work you'd done before I started mine, if nothing else I'd prefer to have built in top of yours rather than writing from scratch!

While working on this space I did look at just exposing the C code rather than re-writing in python, but the structure of how repl works was making this surprisingly difficult!

Maybe it is still worth breaking out smaller chunks to use, but that does at the flash overhead of said python interface code that everyone gets regardless of whether they use aiorepl.
I'd be keen to figure out a way to make the built in repl able to be re-run in async.

This modded micropython apparently has some async support in the repl, but it's all mashed into the one mega-commit, I haven't looked into exactly what's been done with the repl:
https://github.com/gneverov/micropythonrt

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied