circuitpython/py
Damien George 1694bc733d py: Add stream reading of n unicode chars; unicode support by default.
With unicode enabled, this patch allows reading a fixed number of
characters from text-mode streams; eg file.read(5) will read 5 unicode
chars, which can made of more than 5 bytes.

For an ASCII stream (ie no chars > 127) it only needs to do 1 read.  If
there are lots of non-ASCII chars in a stream, then it needs multiple
reads of the underlying object.

Adds a new test for this case.  Enables unicode support by default on
unix and stmhal ports.
2014-07-19 18:34:04 +01:00
..
argcheck.c Merge branch 'master' of https://github.com/micropython/micropython 2014-05-06 16:52:35 +00:00
asmthumb.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
asmthumb.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
asmx64.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
asmx64.h py, compiler: Improve passes; add an extra pass for native emitter. 2014-05-07 17:24:22 +01:00
bc0.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
bc.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
binary.c binary: Factor out mp_binary_set_int(). 2014-07-05 23:54:03 +03:00
binary.h binary: Factor out mp_binary_set_int(). 2014-07-05 23:54:03 +03:00
builtin.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
builtin.h moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
builtinevex.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
builtinimport.c py: Make 3 functions static. 2014-06-11 19:55:46 +01:00
builtintables.c moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
builtintables.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
compile.c moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
compile.h py: Rename BYTE_CODE to BYTECODE (this was missed in previous rename). 2014-05-12 22:35:37 +01:00
emit.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
emitbc.c emitbc: Fix structure field alignment issue. 2014-07-12 15:57:28 +03:00
emitcommon.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
emitcpy.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
emitglue.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
emitglue.h py: Remove emit_glue init and deinit. Needed only for debugging. 2014-05-12 23:11:14 +01:00
emitinlinethumb.c py, inline asm: Change "and" op name to "and_" to avoid keyword clash. 2014-07-17 12:37:56 +01:00
emitnative.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
emitpass1.c py: Improvements to native emitter. 2014-06-30 05:17:25 +01:00
formatfloat.c formatfloat.c: Typo fix in comment. 2014-07-17 20:45:58 +03:00
formatfloat.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
gc.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
gc.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
grammar.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
lexer.c lexer: Convert type (u)int to mp_(u)int_t. 2014-07-03 13:47:47 +01:00
lexer.h lexer: Convert type (u)int to mp_(u)int_t. 2014-07-03 13:47:47 +01:00
lexerstr.c lexer: Convert type (u)int to mp_(u)int_t. 2014-07-03 13:47:47 +01:00
lexerunix.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
lexerunix.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
makeqstrdata.py Bring the C and Python compute_hash functions into consistency 2014-06-07 07:06:18 +10:00
malloc.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
map.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
misc.h py: Add generic helper to align a pointer. 2014-07-12 15:57:28 +03:00
mkenv.mk py, mk: Revert change where build variables set with ?=. 2014-06-07 13:14:45 +01:00
mkrules.mk Merge branch 'teensy-new' of github.com:dhylands/micropython into dhylands-teensy-new 2014-07-02 13:42:37 +01:00
modarray.c py: Allow to disable array module and bytearray type. 2014-06-27 21:02:04 +03:00
modcmath.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
modcollections.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
modgc.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
modio.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
modmath.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
modmicropython.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
modstruct.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
modsys.c py: Implement sys.maxsize, standard way to check platform "bitness". 2014-07-03 18:09:36 +03:00
mpconfig.h moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
mpz.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
mpz.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
nlr.h py: Support arm and thumb ARM ISAs, in addition to thumb2. 2014-06-22 01:40:45 +03:00
nlrsetjmp.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
nlrthumb.S py: Support arm and thumb ARM ISAs, in addition to thumb2. 2014-06-22 01:40:45 +03:00
nlrx64.S unix: Create __bss_start and _end symbols for Mach-O targets. 2014-05-12 00:13:10 +02:00
nlrx86.S Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
obj.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
obj.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objarray.c py: Remove unnecessary argument in bytearray print. 2014-07-17 21:56:32 +01:00
objarray.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objbool.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objboundmeth.c objboundmeth: If detailed reporting enabled, print object content. 2014-05-11 02:27:42 +03:00
objcell.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objclosure.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objcomplex.c py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT. 2014-06-20 18:00:23 +03:00
objdict.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objenumerate.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objexcept.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objfilter.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objfloat.c py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT. 2014-06-20 18:00:23 +03:00
objfun.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objfun.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objgenerator.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objgenerator.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objgetitemiter.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objint_longlong.c py: Implement sys.maxsize, standard way to check platform "bitness". 2014-07-03 18:09:36 +03:00
objint_mpz.c py: Implement sys.maxsize, standard way to check platform "bitness". 2014-07-03 18:09:36 +03:00
objint.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objint.h py: More const usage. 2014-05-17 11:20:10 +03:00
objlist.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objlist.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objmap.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objmodule.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objmodule.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objnamedtuple.c Rename configuration variables controling Python features. 2014-05-24 23:03:12 +01:00
objnone.c py: Rename MP_OBJ_NOT_SUPPORTED to MP_OBJ_NULL. 2014-05-21 19:42:43 +01:00
objobject.c py: Initial attempts to actually allow implementing __new__ in Python. 2014-05-22 00:32:00 +03:00
objproperty.c Rename bultins config variables to MICROPY_PY_BUILTINS_*. 2014-06-01 13:32:54 +01:00
objrange.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objset.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objslice.c Rename bultins config variables to MICROPY_PY_BUILTINS_*. 2014-06-01 13:32:54 +01:00
objstr.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objstr.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objstringio.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objstrunicode.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objtuple.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objtuple.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
objtype.c py: Automatically ake __new__ a staticmethod. 2014-07-05 05:55:00 +01:00
objtype.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
objzip.c py: Use mp_arg_check_num in more places. 2014-05-11 18:37:21 +01:00
opmethods.c Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
parse.c parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
parse.h parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
parsehelper.c lexer: Convert type (u)int to mp_(u)int_t. 2014-07-03 13:47:47 +01:00
parsehelper.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
parsenum.c parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
parsenum.h parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
parsenumbase.c parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
parsenumbase.h parser: Convert (u)int to mp_(u)int_t. 2014-07-03 14:13:33 +01:00
pfenv.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
pfenv.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
py-version.sh - Let the build environment decide about the toolchain to be used, in case 2014-06-07 09:16:42 +02:00
py.mk moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
qstr.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
qstr.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
qstrdefs.h moductypes: Add symbolic constants to specify bitfield position/length. 2014-07-11 00:06:36 +03:00
repl.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
repl.h Tidy up some configuration options. 2014-05-21 20:32:59 +01:00
runtime0.h py: Fix configurability of builtin slice. 2014-06-01 13:49:35 +01:00
runtime.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
runtime.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
scope.c py: Include mpconfig.h before all other includes. 2014-06-21 22:43:22 +03:00
scope.h Add license header to (almost) all files. 2014-05-03 23:27:38 +01:00
sequence.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
showbc.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
smallint.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
smallint.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
stackctrl.c stackctrl: Add "mp_" prefix. 2014-07-01 02:14:08 +03:00
stackctrl.h stackctrl: Add "mp_" prefix. 2014-07-01 02:14:08 +03:00
stream.c py: Add stream reading of n unicode chars; unicode support by default. 2014-07-19 18:34:04 +01:00
stream.h stream: Factor out mp_stream_write() method to write a memstring to stream. 2014-07-13 23:14:32 +03:00
unicode.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
unicode.h Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
vm.c Rename machine_(u)int_t to mp_(u)int_t. 2014-07-03 13:25:24 +01:00
vmentrytable.h Fix some unused variables, and silence a clang warning about initialization override in vmentrytable.h 2014-05-12 09:06:18 +02:00
vstr.c vstr: Restore bytestr compatibility. 2014-06-27 00:04:18 +03:00