diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2021-08-12 13:59:29 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2021-08-13 22:53:29 +1000 |
commit | c737cde9472741337be0c0a66e8e99695c6a9b14 (patch) | |
tree | 1d2d5a3d9b0580cc2d0a8abacbec98a55fb3d791 /docs/esp8266 | |
parent | 218606351c6f9688a3f90dad791bcb2109adcf1b (diff) | |
download | micropython-c737cde9472741337be0c0a66e8e99695c6a9b14.tar.gz micropython-c737cde9472741337be0c0a66e8e99695c6a9b14.zip |
docs: Replace ufoo with foo in all docs.
Anywhere a module is mentioned, use its "non-u" name for consistency.
The "import module" vs "import umodule" is something of a FAQ, and this
commit intends to help clear that up. As a first approximation MicroPython
is Python, and so imports should work the same as Python and use the same
name, to a first approximation. The u-version of a module is a detail that
can be learned later on, when the user wants to understand more and have
finer control over importing.
Existing Python code should just work, as much as it is possible to do that
within the constraints of embedded systems, and the MicroPython
documentation should match the idiomatic way to write Python code.
With universal weak links for modules (via MICROPY_MODULE_WEAK_LINKS) users
can consistently use "import foo" across all ports (with the exception of
the minimal ports). And the ability to override/extend via "foo.py"
continues to work well.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'docs/esp8266')
-rw-r--r-- | docs/esp8266/general.rst | 4 | ||||
-rw-r--r-- | docs/esp8266/quickref.rst | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/docs/esp8266/general.rst b/docs/esp8266/general.rst index 4999bc2e9b..be0437e752 100644 --- a/docs/esp8266/general.rst +++ b/docs/esp8266/general.rst @@ -117,7 +117,7 @@ Real-time clock RTC in ESP8266 has very bad accuracy, drift may be seconds per minute. As a workaround, to measure short enough intervals you can use -``utime.time()``, etc. functions, and for wall clock time, synchronize from +``time.time()``, etc. functions, and for wall clock time, synchronize from the net using included ``ntptime.py`` module. Due to limitations of the ESP8266 chip the internal real-time clock (RTC) @@ -203,7 +203,7 @@ limitation with usage of TLS on the low-memory devices: communication with other devices. There are also some not implemented features specifically in MicroPython's -``ussl`` module based on axTLS: +``ssl`` module based on axTLS: 6. Certificates are not validated (this makes connections susceptible to man-in-the-middle attacks). diff --git a/docs/esp8266/quickref.rst b/docs/esp8266/quickref.rst index 72b3596697..9e64723b27 100644 --- a/docs/esp8266/quickref.rst +++ b/docs/esp8266/quickref.rst @@ -78,13 +78,13 @@ A useful function for connecting to your local WiFi network is:: pass print('network config:', wlan.ifconfig()) -Once the network is established the :mod:`socket <usocket>` module can be used +Once the network is established the :mod:`socket <socket>` module can be used to create and use TCP/UDP sockets as usual. Delay and timing ---------------- -Use the :mod:`time <utime>` module:: +Use the :mod:`time <time>` module:: import time @@ -171,15 +171,15 @@ attaches the REPL). To detach the REPL from UART0, use:: - import uos - uos.dupterm(None, 1) + import os + os.dupterm(None, 1) The REPL is attached by default. If you have detached it, to reattach it use:: - import uos, machine + import os, machine uart = machine.UART(0, 115200) - uos.dupterm(uart, 1) + os.dupterm(uart, 1) PWM (pulse width modulation) ---------------------------- |