summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-03-07 14:49:25 +1100
committerDamien George <damien.p.george@gmail.com>2018-03-07 14:49:25 +1100
commit63b003d52350b4c8468d000f544ae9a634de1493 (patch)
treecc40f97bd84dd480963c2e00ae51c60bca0d4426
parenta5fb699d87ffa178736021c4763d323be54e87d4 (diff)
docs/library/uos: Create sections for distinct parts and document uname.
-rw-r--r--docs/library/uos.rst35
1 files changed, 27 insertions, 8 deletions
diff --git a/docs/library/uos.rst b/docs/library/uos.rst
index c7fa4b308..85754c5a1 100644
--- a/docs/library/uos.rst
+++ b/docs/library/uos.rst
@@ -6,11 +6,32 @@
|see_cpython_module| :mod:`python:os`.
-The ``uos`` module contains functions for filesystem access and ``urandom``
-function.
+The ``uos`` module contains functions for filesystem access and mounting,
+terminal redirection and duplication, and the ``uname`` and ``urandom``
+functions.
-Functions
----------
+General functions
+-----------------
+
+.. function:: uname()
+
+ Return a tuple (possibly a named tuple) containing information about the
+ underlying machine and/or its operating system. The tuple has five fields
+ in the following order, each of them being a string:
+
+ * ``sysname`` -- the name of the underlying system
+ * ``nodename`` -- the network name (can be the same as ``sysname``)
+ * ``release`` -- the version of the underlying system
+ * ``version`` -- the MicroPython version and build date
+ * ``machine`` -- an identifier for the underlying hardware (eg board, CPU)
+
+.. function:: urandom(n)
+
+ Return a bytes object with *n* random bytes. Whenever possible, it is
+ generated by the hardware random number generator.
+
+Filesystem access
+-----------------
.. function:: chdir(path)
@@ -84,10 +105,8 @@ Functions
Sync all filesystems.
-.. function:: urandom(n)
-
- Return a bytes object with n random bytes. Whenever possible, it is
- generated by the hardware random number generator.
+Terminal redirection and duplication
+------------------------------------
.. function:: dupterm(stream_object, index=0)