docs/library/uos: Create sections for distinct parts and document uname.
This commit is contained in:
parent
a5fb699d87
commit
63b003d523
@ -6,11 +6,32 @@
|
|||||||
|
|
||||||
|see_cpython_module| :mod:`python:os`.
|
|see_cpython_module| :mod:`python:os`.
|
||||||
|
|
||||||
The ``uos`` module contains functions for filesystem access and ``urandom``
|
The ``uos`` module contains functions for filesystem access and mounting,
|
||||||
function.
|
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)
|
.. function:: chdir(path)
|
||||||
|
|
||||||
@ -84,10 +105,8 @@ Functions
|
|||||||
|
|
||||||
Sync all filesystems.
|
Sync all filesystems.
|
||||||
|
|
||||||
.. function:: urandom(n)
|
Terminal redirection and duplication
|
||||||
|
------------------------------------
|
||||||
Return a bytes object with n random bytes. Whenever possible, it is
|
|
||||||
generated by the hardware random number generator.
|
|
||||||
|
|
||||||
.. function:: dupterm(stream_object, index=0)
|
.. function:: dupterm(stream_object, index=0)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user