blmorris
bdd78c31b6
py: Add stream_tell method, and use for unix and stmhal file tell.
9 years ago
Damien George
51dfcb4bb7
py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022 .
10 years ago
Paul Sokolovsky
838eb1fa2d
stream: Implement seek operation support via ioctl, wrapped in generic method.
Also, implement for unix port.
10 years ago
Paul Sokolovsky
1a55b6a787
unix, stmhal: Implement file.readinto() method.
Also, usocket.readinto(). Known issue is that .readinto() should be available
only for binary files, but micropython uses single method table for both
binary and text files.
10 years ago
Paul Sokolovsky
ac736f15c9
stream: Factor out mp_stream_write() method to write a memstring to stream.
10 years ago
Damien George
04b9147e15
Add license header to (almost) all files.
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/.
11 years ago
Damien George
d5f5b2f766
py, stream: Implement readlines for a stream.
11 years ago
Paul Sokolovsky
d54bef7692
stream: Add generic unbuffered iternext method.
Uses stream_unbuffered_readline underline.
11 years ago
Paul Sokolovsky
9953ca432b
Add unbuffered readline() implementation for Raw I/O files.
11 years ago
Paul Sokolovsky
5225450b9f
Add generic impl of stream .readall() method. Use one for unix io.FileIO.
11 years ago
Paul Sokolovsky
e98cf40c34
Add generic implementations of Python read()/write methods for streams.
These can be used for any object which implements stream protocol
(mp_stream_p_t).
11 years ago