summaryrefslogtreecommitdiffstatshomepage
path: root/py/builtintables.c
Commit message (Collapse)AuthorAge
* py: Add builtin round function.Damien George2014-10-31
| | | | Addresses issue #934.
* py: Implement compile builtin, enabled only on unix port.Damien George2014-10-25
| | | | | | | This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
* py: Add builtin memoryview object (mostly using array code).Damien George2014-10-23
|
* extmod: Add uheapq module.Damien George2014-10-22
|
* py: Remove unused and unneeded SystemError exception.Damien George2014-10-22
| | | | | It's purpose is for internal errors that are not catastrophic (ie not as bad as RuntimeError). Since we don't use it, we don't need it.
* modzlibd: Remove, superceded by moduzlib.Paul Sokolovsky2014-10-13
|
* Merge pull request #904 from pfalcon/moduzlibDamien George2014-10-12
|\ | | | | Module "uzlib" - based on similarly named library
| * moduzlib: Integrate into the system.Paul Sokolovsky2014-10-13
| |
* | py: Add module weak link support.Damien George2014-10-12
|/ | | | | | | | | | | With this patch a port can enable module weak link support and provide a dict of qstr->module mapping. This mapping is looked up only if an import fails to find the requested module in the filesystem. This allows to have the builtin module named, eg, usocket, and provide a weak link of "socket" to the same module, but this weak link can be overridden if a file by the name "socket.py" is found in the import path.
* modure: Initial module, using re1.5 (which is based on re1 codebase).Paul Sokolovsky2014-10-11
| | | | https://github.com/pfalcon/re1.5
* py: Remove IOError since it's deprecated; use OSError instead.Damien George2014-09-30
| | | | | | | | | | | In CPython IOError (and EnvironmentError) is deprecated and aliased to OSError. All modules that used to raise IOError now raise OSError (or a derived exception). In Micro Python we never used IOError (except 1 place, incorrectly) and so don't need to keep it. See http://legacy.python.org/dev/peps/pep-3151/ for background.
* py: Add 'builtins' module.Damien George2014-09-17
|
* py: Add native json printing using existing print framework.Damien George2014-09-17
| | | | | Also add start of ujson module with dumps implemented. Enabled in unix and stmhal ports. Test passes on both.
* Remove skeletal modselect from extmod and just put it in stmhal.Damien George2014-09-07
|
* stmhal: Implement generic select.select and select.poll.Damien George2014-09-07
|
* py: Put SystemExit in builtin namespace.Damien George2014-08-16
| | | | Also fix unix port so that SystemExit with no arg exits with value 0.
* modzlibd: Decompress part of "zlib" module, based on miniz tinfl.c .Paul Sokolovsky2014-08-13
|
* py: Implement builtin reversed() function.Damien George2014-08-12
| | | | | | | | 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).
* moductypes: Foreign data interface module, roughly based on ctype ideas.Paul Sokolovsky2014-07-09
| | | | | But much smaller and memory-efficient. Uses Python builtin data structures (dict, tuple, int) to describe structure layout.
* py: Allow to disable array module and bytearray type.Paul Sokolovsky2014-06-27
| | | | | array.array and bytearray share big deal of code, so to get real savings, both need to be disabled.
* py: Include mpconfig.h before all other includes.Paul Sokolovsky2014-06-21
| | | | | | It defines types used by all other headers. Fixes #691.
* py: Separate MICROPY_PY_BUILTINS_COMPLEX from MICROPY_PY_BUILTINS_FLOAT.Paul Sokolovsky2014-06-20
| | | | | One thing is wanting to do 1 / 2 and get something else but 0, and quite another - doing rocket science ;-).
* Prefix ARRAY_SIZE with micropython prefix MP_Emmanuel Blot2014-06-19
|
* py: Rename builtin "io" to "_io".Paul Sokolovsky2014-06-12
| | | | | | | | 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).
* py: Properly fix configuration of float and math module.Damien George2014-06-03
|
* py: Fix configuration of math module.Damien George2014-06-03
|
* py: Add option to disable set() object (enabled by default).Damien George2014-06-01
|
* Rename bultins config variables to MICROPY_PY_BUILTINS_*.Damien George2014-06-01
| | | | | | | | | | 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.
* Rename configuration variables controling Python features.Damien George2014-05-24
| | | | Now of the form MICROPY_PY_*. See issue #35.
* Tidy up some configuration options.Damien George2014-05-21
| | | | | | | | | | MP_ALLOC_* -> MICROPY_ALLOC_* MICROPY_PATH_MAX -> MICROPY_ALLOC_PATH_MAX MICROPY_ENABLE_REPL_HELPERS -> MICROPY_HELPER_REPL MICROPY_ENABLE_LEXER_UNIX -> MICROPY_HELPER_LEXER_UNIX MICROPY_EXTRA_* -> MICROPY_PORT_* See issue #35.
* py: Add basic implementation of hasattr() function.Paul Sokolovsky2014-05-11
|
* objset: Give up and implement frozenset.Paul Sokolovsky2014-05-10
| | | | Tired of patching CPython stdlib for it.
* modgc: Add new module for GC-related functionality.Paul Sokolovsky2014-05-06
|
* Add license header to (almost) all files.Damien George2014-05-03
| | | | | | | 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/.
* Add ARRAY_SIZE macro, and use it where possible.Damien George2014-04-26
|
* py: Make collections module configurable, enabled by default.Damien George2014-04-26
|
* py: Make built-in 'range' a class.Damien George2014-04-17
| | | | Addresses issue #487.
* py: Add cmath module, for complex math. Disabled by default.Damien George2014-04-17
| | | | Not all functions implemented. Not enabled on pyboard.
* py: Add builtin functions bin and oct, and some tests for them.Damien George2014-04-15
|
* py: Add hex builtin function.Damien George2014-04-15
| | | | A one-liner, added especially for @pfalcon :)
* py: Add property object, with basic functionality.Damien George2014-04-13
| | | | Enabled by MICROPY_ENABLE_PROPERTY.
* py: Add more #if's for configurable MOD_SYS.Damien George2014-04-13
|
* Merge pull request #476 from pfalcon/static-sysDamien George2014-04-13
|\ | | | | Convert sys module to static allocation
| * py, unix: Convert sys module to static representation.Paul Sokolovsky2014-04-13
| |
* | py: Rename collections module to _collections.Paul Sokolovsky2014-04-13
|/ | | | | We're not going to implement all the plethora of types in there in C. Funnily, CPython implements defaultdict in C, and namedtuple in Python.
* py: Start implementing "struct" module.Paul Sokolovsky2014-04-10
| | | | | | | | | Only calcsize() and unpack() functions provided so far, for little-endian byte order. Format strings don't support repition spec (like "2b3i"). Unfortunately, dealing with all the various binary type sizes and alignments will lead to quite a bloated "binary" helper functions - if optimizing for speed. Need to think if using dynamic parametrized algos makes more sense.
* py: Make bytearray a proper type.Paul Sokolovsky2014-04-08
|
* py: Implement globals() and locals() builtins.Paul Sokolovsky2014-04-06
|
* py: Make globals and locals proper dictionary objects.Damien George2014-04-05
| | | | | | | | | | | Finishes addressing issue #424. In the end this was a very neat refactor that now makes things a lot more consistent across the py code base. It allowed some simplifications in certain places, now that everything is a dict object. Also converted builtins tables to dictionaries. This will be useful when we need to turn builtins into a proper module.
* py: Put default namespace into module __main__.Paul Sokolovsky2014-04-05
| | | | That's how CPython has it, in particular, "import __main__" should work.