Skip to content

Commit fd283eb

Browse files
committed
docs/sys: Describe sys.platform is port-neutral manner.
1 parent e9b7610 commit fd283eb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

docs/library/sys.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,12 @@ Constants
8888

8989
.. data:: platform
9090

91-
The platform that MicroPython is running on. This is "pyboard" on the
92-
pyboard and provides a robust way of determining if a script is running
93-
on the pyboard or not.
91+
The platform that MicroPython is running on. For OS/RTOS ports, this is
92+
usually an identifier of the OS, e.g. ``"linux"``. For baremetal ports it
93+
is an identifier of a board, e.g. "pyboard" for the original MicroPython
94+
reference board. It thus can be used to distinguish one board from another.
95+
If you need to check whether your program runs on MicroPython (vs other
96+
Python implementation), use ``sys.implementation`` instead.
9497

9598
.. data:: stderr
9699

0 commit comments

Comments
 (0)