Commit Graph

10 Commits

Author SHA1 Message Date
Damien George
51dfcb4bb7 py: Move to guarded includes, everywhere in py/ core.
Addresses issue #1022.
2015-01-01 20:32:09 +00:00
Paul Sokolovsky
838eb1fa2d stream: Implement seek operation support via ioctl, wrapped in generic method.
Also, implement for unix port.
2014-11-17 00:16:14 +02:00
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.
2014-10-18 22:44:07 +03:00
Paul Sokolovsky
ac736f15c9 stream: Factor out mp_stream_write() method to write a memstring to stream. 2014-07-13 23:14:32 +03:00
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/.
2014-05-03 23:27:38 +01:00
Damien George
d5f5b2f766 py, stream: Implement readlines for a stream. 2014-05-03 22:01:32 +01:00
Paul Sokolovsky
d54bef7692 stream: Add generic unbuffered iternext method.
Uses stream_unbuffered_readline underline.
2014-01-20 18:42:08 +02:00
Paul Sokolovsky
9953ca432b Add unbuffered readline() implementation for Raw I/O files. 2014-01-15 23:43:25 +02:00
Paul Sokolovsky
5225450b9f Add generic impl of stream .readall() method. Use one for unix io.FileIO. 2014-01-13 23:31:06 +02:00
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).
2014-01-08 17:38:38 +02:00