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
GitLab 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
8ebdbcfb
Commit
8ebdbcfb
authored
May 1, 2016
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
docs: Add _io module reference.
parent
348caaf9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
docs/library/_io.rst
+46
-0
46 additions, 0 deletions
docs/library/_io.rst
docs/library/index.rst
+3
-0
3 additions, 0 deletions
docs/library/index.rst
with
49 additions
and
0 deletions
docs/library/_io.rst
0 → 100644
+
46
−
0
View file @
8ebdbcfb
:mod:`_io` -- input/output streams
==================================
.. module:: _io
:synopsis: input/output streams
This module contains additional types of stream (file-like) objects
and helper functions.
Functions
---------
.. function:: open(name, mode='r', **kwargs)
Open a file. Builtin ``open()`` function is alised to this function.
All ports (which provide access to file system) are required to support
`mode` parameter, but support for other arguments vary by port.
Classes
-------
.. class:: FileIO(...)
This is type of a file open in binary mode, e.g. using ``open(name, "rb")``.
You should not instantiate this class directly.
.. class:: TextIOWrapper(...)
This is type of a file open in text mode, e.g. using ``open(name, "rt")``.
You should not instantiate this class directly.
.. class:: StringIO([string])
.. class:: BytesIO([string])
In-memory file-like objects for input/output. `StringIO` is used for
text-mode I/O (similar to a normal file opened with "t" modifier).
`BytesIO` is used for binary-mode I/O (similar to a normal file
opened with "b" modifier). Initial contents of file-like objects
can be specified with `string` parameter (should be normal string
for `StringIO` or bytes object for `BytesIO`). All the usual file
methods like ``read()``, ``write()``, ``close()`` are available on
these objects, and additionally, following method:
.. method:: getvalue()
Get the current contents of the underlying buffer which holds data.
This diff is collapsed.
Click to expand it.
docs/library/index.rst
+
3
−
0
View file @
8ebdbcfb
...
...
@@ -30,6 +30,7 @@ library.
cmath.rst
_collections.rst
gc.rst
_io.rst
math.rst
select.rst
sys.rst
...
...
@@ -52,6 +53,7 @@ library.
cmath.rst
_collections.rst
gc.rst
_io.rst
math.rst
select.rst
sys.rst
...
...
@@ -89,6 +91,7 @@ library.
_collections.rst
gc.rst
_io.rst
math.rst
sys.rst
ubinascii.rst
...
...
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