docs/unix: Document the "-e" option.

Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
pull/12807/head
Matthias Urlichs 2023-10-26 09:28:37 +02:00
rodzic 139ba10c34
commit eed0df3260
1 zmienionych plików z 15 dodań i 1 usunięć

Wyświetl plik

@ -8,7 +8,7 @@ Command line options
Usage::
micropython [ -h ] [ -i ] [ -O<level> ] [ -v ] [ -X <option> ] [ -c <command> | -m <module> | <script> ] [ <args> ]
micropython [ -h ] [ -i ] [ -e ] [ -O<level> ] [ -v ] [ -X <option> ] [ -c <command> | -m <module> | <script> ] [ <args> ]
Invocation options:
@ -17,6 +17,20 @@ Invocation options:
Runs the code in ``<command>``. The code can be one or more Python statements.
.. option:: -e
Runs MicroPython in "embedded mode":
* ``boot.py`` and ``main.py`` are executed; boot.py unconditionally,
``main.py`` only if no script argument is used.
* Instead of the ``readline`` library, MicroPython uses the same REPL as
on embedded systems.
This mode is mainly useful for running MicroPython as a subprocess, e.g.
for testing. For interactive use, a ``stty raw; micropython -e …; stty
-raw`` wrapper is required.
.. option:: -m <module>
Runs the module ``<module>``. The module must be in ``sys.path``.