Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 1.3 KB

usys.rst

File metadata and controls

54 lines (35 loc) · 1.3 KB
.. pybricks-requirements:: stm32-extra

:mod:`usys` -- System specific functions

This MicroPython module is a subset of the sys module in Python.

Input and output streams

.. module:: usys

.. autodata:: usys.stdin
    :annotation:

.. autodata:: usys.stdout
    :annotation:

.. autodata:: usys.stderr
    :annotation:

Version info

.. autodata:: implementation
    :annotation:

.. autodata:: version
    :annotation:

.. autodata:: version_info
    :annotation:

Examples

Version information

.. literalinclude::
    ../../../examples/micropython/usys/pybricks_version.py

.. literalinclude::
    ../../../examples/micropython/usys/micropython_version.py

Standard input and output

The stdin stream can be used to capture input via the Pybricks Code input/output window. See the keyboard input project to learn how this works. This approach can be extended to exchange data with any other device as well.