Damien George
97790455fe
Improve REPL detecting when input needs to continue.
...
Full CPython compatibility with this requires actually parsing the
input so far collected, and if it fails parsing due to lack of tokens,
then continue collecting input. It's not worth doing it this way. Not
having compatibility at this level does not hurt the goals of Micro
Python.
2014-04-08 11:04:29 +00:00
Paul Sokolovsky
72d70cb045
unix, stmhal: Consistently use "FileIO" as class name for file objects.
...
They correspond to io.FileIO in io module hierarchy (with small caveat
that io.FileIO is raw file and works with bytes, not strings).
2014-04-08 04:08:16 +03:00
Paul Sokolovsky
b8cf948550
unix, windows: There's no "help" builtin.
2014-04-08 04:07:02 +03:00
Damien George
a12a0f78b0
py: Rename pfenv_print_int to pfenv_print_mp_int, and add back former.
...
stmhal relies on pfenv_* to implement its printf. Thus, it needs a
pfenv_print_int which prints a proper 32-bit integer. With latest
change to pfenv, this function became one that took mp_obj_t, and
extracted the integer value from that object.
To fix temporarily, pfenv_print_int has been renamed to
pfenv_print_mp_int (to indicate it takes a mp_obj_t for the int), and
pfenv_print_int has been added (which takes a normal C int). Currently,
pfenv_print_int proxies to pfenv_print_mp_int, but this means it looses
the MSB. Need to find a way to fix this, but the only way I can think
of will duplicate lots of code.
2014-04-08 01:29:53 +01:00
Damien George
97543c5285
Merge pull request #447 from dhylands/str-format-mpz
...
Add string formatting support for longlong and mpz.
2014-04-07 21:50:22 +01:00
Dave Hylands
23dc6d0ace
Fix truncation problem when using longlong implementation.
2014-04-07 13:47:04 -07:00
Paul Sokolovsky
98dd6d7712
README: Be specific that ARMv7 Linux is supported.
2014-04-07 23:46:08 +03:00
Dave Hylands
c4029e5079
Add string formatting support for longlong and mpz.
2014-04-07 11:38:45 -07:00
Damien George
6827f9fc55
Add uPy welcome message to UNIX and Windows ports; update Teensy port.
...
Partly addresses issue #154 .
2014-04-07 13:27:50 +01:00
Damien George
6c6f9d6782
windows: Make it compile with latest changes to py core.
2014-04-07 13:20:06 +01:00
Damien George
10072b72a5
Merge pull request #439 from lurch/makefile-tweaks
...
Makefile tweaks
2014-04-07 13:17:31 +01:00
Damien George
1422865c99
Merge pull request #445 from lurch/test-sorted-sets
...
Modify set tests to print sorted sets directly
2014-04-07 13:15:33 +01:00
Damien George
a28507ab2b
py: Detect unmatched tripple quote in repl helper.
2014-04-07 13:01:30 +01:00
Damien George
34ba06b076
Merge pull request #444 from lurch/test-sorted
...
Add tests for sorted() function
2014-04-07 12:52:28 +01:00
Andrew Scheller
1ff6011abc
Modify set tests to print sorted sets directly
...
instead of creating temporary lists and sorting those in-place
2014-04-07 05:00:03 +01:00
Andrew Scheller
a1a9ab2b2c
Add tests for sorted() function
...
and check that sorted(list) produces same output as list.sort()
2014-04-07 04:41:54 +01:00
Andrew Scheller
5e443f4b70
Merge remote-tracking branch 'upstream/master' into makefile-tweaks
2014-04-07 01:41:24 +01:00
Andrew Scheller
902d9552c5
Replace some Makefile commands with variables in py/mkenv.mk
2014-04-07 01:35:45 +01:00
Damien George
2bfd2dc770
py: Revert revert for allocation policy of set hash table.
2014-04-07 01:16:17 +01:00
Paul Sokolovsky
46bd12d57e
objset: Fix incorrect workaround against mp_set_init() munging alloc size.
...
No longer needed after recent change which guarantees that mp_set_init()
will allocate exact number of slots requested.
2014-04-07 03:08:46 +03:00
Paul Sokolovsky
4d2238d2ce
tests: Fix more tests which depend on order of elements in set.
2014-04-07 03:08:46 +03:00
Damien George
3bb8663282
Merge branch 'master' of github.com:micropython/micropython
2014-04-07 00:54:53 +01:00
Paul Sokolovsky
bd6f3d31d2
tests: Fix few tests which depend on order of elements in set.
2014-04-07 02:54:16 +03:00
Damien George
c75427baaa
py: Revert change to allocation policy for mp_set_t.
...
Seems that this fixes all set tests.
2014-04-07 00:54:04 +01:00
Paul Sokolovsky
9f043da5c3
pip-micropython: Require command verb, but restrict to "install" only.
...
So, pip-micropython can/should be run as normal pip:
pip-micropython install micropython-unittest
2014-04-07 02:53:41 +03:00