← index #6440PR #1423
Off-topic · high · value 2.578
QUERY · ISSUE

Implement exit() to exit for ./micropython shell

openby nanjekyejoannahopened 2020-09-13updated 2024-09-29
enhancementport-unix

I know that currently CTRL-D exits the shell.

For consistency with other python shells i.e CPython, let us implement exit() as an option to also exit the shell.

If this sounds good, i will track this for myself so that I can implement this as part of google season of docs.

CANDIDATE · PULL REQUEST

README.md: Document "Ctrl+D" shell exit

closedby nyovopened 2015-08-12updated 2015-10-11

This keybind tends to slip my mind. And I noticed that newer uPy does trap CTRL+C/Ctrl+Z now and neither is quit() implemented to drop a hint either.
So after some absence I was quite a bit peeved about this behaviour until finally figuring out how to get out of that shell again (unix build).

In case it's something to put into the shell banner as a hint,

$ ./micropython
Micro Python v1.4.5-1-gb7d5906 on 2015-08-12; linux version
Use Ctrl-D (i.e. EOF) to exit.
>>> 

I added a second commit for that, but feel free to disregard it.

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