- 21 Sep, 2016 1 commit
-
-
Damien George authored
One can instead lookup __name__ in the modules dict to get the value.
-
- 18 Jun, 2016 1 commit
-
-
Paul Sokolovsky authored
It's now used for more than just stream protocol (e.g. pin protocol), so don't use false names.
-
- 17 May, 2016 1 commit
-
-
Paul Sokolovsky authored
Both read and write operations support variants where either a) a single call is made to the undelying stream implementation and returned buffer length may be less than requested, or b) calls are repeated until requested amount of data is collected, shorter amount is returned only in case of EOF or error. These operations are available from the level of C support functions to be used by other C modules to implementations of Python methods to be used in user-facing objects. The rationale of these changes is to allow to write concise and robust code to work with *blocking* streams of types prone to short reads, like serial interfaces and sockets. Particular object types may select "exact" vs "once" types of methods depending on their needs. E.g., for sockets, revc() and send() methods continue to be "once", while read() and write() thus converted to "exactly" versions. These changes don't affect non-blocking handling, e.g. trying "exact" method on the non-blocking socket will return as much data as available without blocking. No data available is continued to be signaled as None return value to read() and write(). From the point of view of CPython compatibility, this model is a cross between its io.RawIOBase and io.BufferedIOBase abstract classes. For blocking streams, it works as io.BufferedIOBase model (guaranteeing lack of short reads/writes), while for non-blocking - as io.RawIOBase, returning None in case of lack of data (instead of raising expensive exception, as required by io.BufferedIOBase). Such a cross-behavior should be optimal for MicroPython needs.
-
- 02 May, 2016 1 commit
-
-
Paul Sokolovsky authored
-
- 25 Mar, 2016 2 commits
-
-
Paul Sokolovsky authored
-
Paul Sokolovsky authored
-
- 24 Mar, 2016 1 commit
-
-
Paul Sokolovsky authored
Just .write() method implemented currently.
-
- 29 Nov, 2015 1 commit
-
-
Damien George authored
-
- 15 Feb, 2015 1 commit
-
-
Damien George authored
-
- 01 Jan, 2015 1 commit
-
-
Damien George authored
Addresses issue #1022.
-
- 29 Nov, 2014 1 commit
-
-
Damien George authored
This is just a clean-up of the code. Generated code is exactly the same.
-
- 21 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
It defines types used by all other headers. Fixes #691.
-
- 19 Jun, 2014 1 commit
-
-
Emmanuel Blot authored
-
- 11 Jun, 2014 1 commit
-
-
Paul Sokolovsky authored
Functionality we provide in builtin io module is fairly minimal. Some code, including CPython stdlib, depends on more functionality. So, there's a choice to either implement it in C, or move it _io, and let implement other functionality in Python. 2nd choice is pursued. This setup matches CPython too (_io is builtin, io is Python-level).
-
- 24 May, 2014 1 commit
-
-
Damien George authored
Now of the form MICROPY_PY_*. See issue #35.
-
- 19 May, 2014 1 commit
-
-
Paul Sokolovsky authored
io.FileIO is binary I/O, ans actually optional. Default file type is io.TextIOWrapper, which provides str results. CPython3 explicitly describes io.TextIOWrapper as buffered I/O, but we don't have buffering support yet anyway.
-
- 15 May, 2014 1 commit
-
-
Paul Sokolovsky authored
Done in generalized manner, allowing any stream class to be specified as working with bytes.
-
- 03 May, 2014 1 commit
-
-
Damien George authored
Blanket wide to all .c and .h files. Some files originating from ST are difficult to deal with (license wise) so it was left out of those. Also merged modpyb.h, modos.h, modstm.h and modtime.h in stmhal/.
-
- 26 Apr, 2014 2 commits
-
-
Paul Sokolovsky authored
-
Damien George authored
-
- 05 Apr, 2014 1 commit
-
-
Damien George authored
Towards addressing issue #424. Had a small increase to ROM usage (order 60 bytes).
-
- 03 Apr, 2014 1 commit
-
-
Paul Sokolovsky authored
So far just includes "open" function, which should be supplied by a port. TODO: Make the module #ifdef'ed.
-