usys: Clean up.

Add requirements, drop autodoc, and add a few cross references.
This commit is contained in:
Laurens Valk
2021-08-05 16:13:50 +02:00
parent 8a6ddf677c
commit 1c01e981e0
2 changed files with 23 additions and 8 deletions
+18 -3
View File
@@ -1,4 +1,19 @@
:mod:`usys` -- System specific functions
========================================
.. pybricks-requirements:: stm32-extra
.. automodule:: usys
:mod:`usys` -- System specific functions
============================================================
This MicroPython module is a subset of the `sys module`_ in Python.
.. module:: usys
.. autodata:: usys.stdin
:annotation:
.. autodata:: usys.stdout
:annotation:
.. autodata:: usys.stderr
:annotation:
.. _sys module: https://docs.python.org/3.5/library/sys.html
+5 -5
View File
@@ -7,17 +7,16 @@
"""
This module provides a subset of the standard Python ``sys`` module.
.. note:: This module is not available on the BOOST Move hub.
"""
from uio import FileIO
# REVIST: most functions are excluded since they aren't useful for Pybricks
# REVISIT: most functions are excluded since they aren't useful for Pybricks
stdin: FileIO = FileIO()
"""
Stream object that receives input from a connected terminal, if any.
Stream object (:class:`uio.FileIO`) that receives input from a connected
terminal, if any.
Writing may modify newline characters. Use ``usys.stdin.buffer`` instead if
this is undesirable.
@@ -28,7 +27,8 @@ are passing binary data via ``stdin``.
stdout: FileIO = FileIO()
"""
Stream object that sends output to a connected terminal, if any.
Stream object (:class:`uio.FileIO`) that sends output to a connected terminal,
if any.
Reading may modify newline characters. Use ``usys.stdout.buffer`` instead if
this is undesirable.