diff options
| author | Damien George <damien.p.george@gmail.com> | 2018-03-09 16:14:58 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2018-03-09 16:14:58 +1100 |
| commit | 9cef2b03a7a7bae2adb91e42320efa3e2af33a22 (patch) | |
| tree | 4fb2eea7b04aadee037963c770d4b0fc041df7db /docs | |
| parent | 993f4345c0fd57668984dd1248e84017c2352238 (diff) | |
docs/reference/repl.rst: Fix some minor errors in the REPL tutorial.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/reference/repl.rst | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/docs/reference/repl.rst b/docs/reference/repl.rst index 7a683ca22..1eccb9a88 100644 --- a/docs/reference/repl.rst +++ b/docs/reference/repl.rst @@ -19,7 +19,7 @@ If your cursor is all the way back at the beginning, pressing RETURN will then execute the code that you've entered. The following shows what you'd see after entering a for statement (the underscore shows where the cursor winds up): - >>> for i in range(3): + >>> for i in range(30): ... _ If you then enter an if statement, an additional level of indentation will be @@ -58,9 +58,10 @@ Auto-completion While typing a command at the REPL, if the line typed so far corresponds to the beginning of the name of something, then pressing TAB will show -possible things that could be entered. For example type ``m`` and press TAB -and it should expand to ``machine``. Enter a dot ``.`` and press TAB again. You -should see something like: +possible things that could be entered. For example, first import the machine +module by entering ``import machine`` and pressing RETURN. +Then type ``m`` and press TAB and it should expand to ``machine``. +Enter a dot ``.`` and press TAB again. You should see something like: >>> machine. __name__ info unique_id reset @@ -151,7 +152,7 @@ method by which you're connected to the MicroPython board (USB-serial, or Wifi). You can perform a soft reset from the REPL by pressing Ctrl-D, or from your python code by executing: :: - raise SystemExit + machine.soft_reset() For example, if you reset your MicroPython board, and you execute a dir() command, you'd see something like this: |
