py: Make print() accept "file" argument, and actually print to stream.

And not system printf(), like it was before. For this, move pfenv_printf()
from stmhal port to py/.
This commit is contained in:
Paul Sokolovsky
2014-07-13 23:07:42 +03:00
parent 04c9fec7d1
commit cb66f41ebc
8 changed files with 238 additions and 151 deletions

View File

@@ -81,5 +81,10 @@ extern const mp_obj_module_t mp_module_struct;
extern const mp_obj_module_t mp_module_sys;
extern const mp_obj_module_t mp_module_gc;
struct _dummy_t;
extern struct _dummy_t mp_sys_stdin_obj;
extern struct _dummy_t mp_sys_stdout_obj;
extern struct _dummy_t mp_sys_stderr_obj;
// extmod modules
extern const mp_obj_module_t mp_module_uctypes;