Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
e30ba2f1
Commit
e30ba2f1
authored
7 years ago
by
Damien George
Browse files
Options
Downloads
Patches
Plain Diff
docs/library: Add description of "index" parameter to uos.dupterm().
parent
6568001c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/library/uos.rst
+18
-4
18 additions, 4 deletions
docs/library/uos.rst
with
18 additions
and
4 deletions
docs/library/uos.rst
+
18
−
4
View file @
e30ba2f1
...
...
@@ -89,8 +89,22 @@ Functions
Return a bytes object with n random bytes. Whenever possible, it is
generated by the hardware random number generator.
.. function:: dupterm(stream_object)
.. function:: dupterm(stream_object
, index=0
)
Duplicate or switch MicroPython terminal (the REPL) on the passed stream-like
object. The given object must implement the ``readinto()`` and ``write()``
methods. If ``None`` is passed, previously set redirection is cancelled.
Duplicate or switch the MicroPython terminal (the REPL) on the given stream-like
object. The *stream_object* argument must implement the ``readinto()`` and
``write()`` methods. The stream should be in non-blocking mode and
``readinto()`` should return ``None`` if there is no data available for reading.
After calling this function all terminal output is repeated on this stream,
and any input that is available on the stream is passed on to the terminal input.
The *index* parameter should be a non-negative integer and specifies which
duplication slot is set. A given port may implement more than one slot (slot 0
will always be available) and in that case terminal input and output is
duplicated on all the slots that are set.
If ``None`` is passed as the *stream_object* then duplication is cancelled on
the slot given by *index*.
The function returns the previous stream-like object in the given slot.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment