summaryrefslogtreecommitdiff
path: root/py/qstrdefs.h
AgeCommit message (Collapse)Author
2014-09-29py: Add casting to viper; add native mem stores to viper.Damien George
Viper can now do the following: def store(p:ptr8, c:int): p[0] = c This does a store of c to the memory pointed to by p using a machine instructions inline in the code.
2014-09-21extmod: Add loads to ujson module.Damien George
2014-09-17py: Add 'builtins' module.Damien George
2014-09-17py: Add native json printing using existing print framework.Damien George
Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
2014-09-07Remove skeletal modselect from extmod and just put it in stmhal.Damien George
2014-09-07stmhal: Implement generic select.select and select.poll.Damien George
2014-09-06py: Add support for emitting native x86 machine code.Damien George
2014-08-27Basic native ARM emitterFabian Vogt
2014-08-26py: Add dispatch for user defined ==, >, <=, >=.Damien George
Addresses issue #827.
2014-08-15py: Allow viper to have type annotations.Damien George
Viper functions can now be annotated with the type of their arguments and return value. Eg: @micropython.viper def f(x:int) -> int: return x + 1
2014-08-13modzlibd: Decompress part of "zlib" module, based on miniz tinfl.c .Paul Sokolovsky
2014-08-12py: #if guard qstrs that are optional.Damien George
Also disable gc module on bare-arm port.
2014-08-12py: Add .real and .imag attributes to complex numbers.Damien George
2014-08-12py: Implement builtin reversed() function.Damien George
reversed function now implemented, and works for tuple, list, str, bytes and user objects with __len__ and __getitem__. Renamed mp_builtin_len to mp_obj_len to make it publically available (eg for reversed).
2014-07-29Merge pull request #738 from dhylands/except-argsDamien George
Add support for storing args during an exception raised by an irq.
2014-07-28py: Implement __file__ attribute for modules.Paul Sokolovsky
2014-07-25Add support for storing args during an exception raised by an irq.Dave Hylands
The user code should call micropython.alloc_emergency_exception_buf(size) where size is the size of the buffer used to print the argument passed to the exception. With the test code from #732, and a call to micropython.alloc_emergenncy_exception_buf(100) the following error is now printed: ```python >>> import heartbeat_irq Uncaught exception in Timer(4) interrupt handler Traceback (most recent call last): File "0://heartbeat_irq.py", line 14, in heartbeat_cb NameError: name 'led' is not defined ```
2014-07-19py: Make print() accept "file" argument, and actually print to stream.Paul Sokolovsky
And not system printf(), like it was before. For this, move pfenv_printf() from stmhal port to py/.
2014-07-11moductypes: Add symbolic constants to specify bitfield position/length.Paul Sokolovsky
2014-07-09moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky
But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
2014-07-03py: Implement sys.maxsize, standard way to check platform "bitness".Paul Sokolovsky
Implementing it as a static constant is a bit peculiar and require cooperation from long int implementation.
2014-06-25modgc: Add mem_free()/mem_alloc() methods.Paul Sokolovsky
Return free/allocated memory on GC heap.
2014-06-12py: Rename builtin "io" to "_io".Paul Sokolovsky
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).
2014-06-08objtype: Enable __lt__ method support for instances.Paul Sokolovsky
2014-06-07modsys: Add optional support for sys.platform.Paul Sokolovsky
Ports which wants to have it, should define MICROPY_PY_SYS_PLATFORM to a string value they need.
2014-06-01Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George
This renames: MICROPY_PY_FROZENSET -> MICROPY_PY_BUILTINS_FROZENSET MICROPY_PY_PROPERTY -> MICROPY_PY_BUILTINS_PROPERTY MICROPY_PY_SLICE -> MICROPY_PY_BUILTINS_SLICE MICROPY_ENABLE_FLOAT -> MICROPY_PY_BUILTINS_FLOAT See issue #35 for discussion.
2014-05-31add methods isspace(), isalpha(), isdigit(), isupper() and islower() to strKim Bauters
2014-05-24Add SystemExit exception and use it in unix/ and stmhal/ ports.Damien George
Addresses issue #598.
2014-05-24Rename configuration variables controling Python features.Damien George
Now of the form MICROPY_PY_*. See issue #35.
2014-05-24objstr: Implement .endswith().Paul Sokolovsky
2014-05-19py: Implement proper separation between io.FileIO and io.TextIOWrapper.Paul Sokolovsky
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.
2014-05-19objtype: Separate __new__ and __init__ methods.Paul Sokolovsky
Now schedule is: for native types, we call ->make_new() C-level method, which should perform actions of __new__ and __init__ (note that this is not compliant, but is efficient), but for user types, __new__ and __init__ are called as expected. Also, make sure we convert scalar attribute value to a bound-pair tight in mp_obj_class_lookup() method, which avoids converting it again and again in its callers.
2014-05-14objstr.c: Partial implementation of .rsplit().Paul Sokolovsky
sep=None is TODO.
2014-05-11py: Add basic implementation of hasattr() function.Paul Sokolovsky
2014-05-10objstr: Implement .lower() and .upper().Paul Sokolovsky
2014-05-10modsys, unix: Add sys.exit(), should be implemented by a port.Paul Sokolovsky
2014-05-10objset: Give up and implement frozenset.Paul Sokolovsky
Tired of patching CPython stdlib for it.
2014-05-10py: Rename byte_code to bytecode everywhere.Damien George
bytecode is the more widely used. See issue #590.
2014-05-08Add gc.enable, gc.disable; remove pyb.gc.Damien George
2014-05-08py, compiler: Add basic support for A=const(123).Damien George
You can now do: X = const(123) Y = const(456 + X) and the compiler will replace X and Y with their values. See discussion in issue #266 and issue #573.
2014-05-06py: Add keyword arg support to enumerate constructor.Damien George
Need to have a policy as to how far we go adding keyword support to built ins. It's nice to have, and gets better CPython compatibility, but hurts the micro nature of uPy. Addresses issue #577.
2014-05-06modgc: Add new module for GC-related functionality.Paul Sokolovsky
2014-05-03Add license header to (almost) all files.Damien George
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-03py, stream: Implement readlines for a stream.Damien George
2014-04-28py: Remove silly comment about interning keywords.Damien George
Of course, keywords are turned into lexer tokens in the lexer, so will never need to be interned (unless you do something like x="def"). As it is now, the following on pyboard makes no new qstrs: import pyb pyb.info()
2014-04-27py: Add '*' qstr for 'import *'; use blank qstr for comprehension arg.Damien George
2014-04-26py: "read" & "write" are so common that make them core.Paul Sokolovsky
Few other strings move to core, but make depend on "io" module.
2014-04-26modio: Implement io.StringIO class.Paul Sokolovsky
2014-04-26objstr: Implement .lstrip() & .rstrip().Paul Sokolovsky
Share code with .strip(). TODO: optimize .rstrip().
2014-04-25py: Support instance __call__ method.Paul Sokolovsky