Paul Sokolovsky
c8742a06ca
Add dummy micropython module to enable mandel.py run with CPython.
11 years ago
Paul Sokolovsky
d0db3d3e45
conwaylife.py: Give people chance to enjoy the show.
Delay between frames; run more generations.
11 years ago
Paul Sokolovsky
2aefde06b7
CPython pyb.py placeholder: Implement delay().
11 years ago
Paul Sokolovsky
a671f891dd
Make file.read() and file.read(-1) call out to file.readall().
Per Python3 io module semantics.
11 years ago
Paul Sokolovsky
323c09e881
Do not assume that vstr buf is the same after it was extended.
11 years ago
Paul Sokolovsky
f2b796e7c7
str.format: Don't assume that '}' immediately follows '{', skip insides.
That at least makes stuff like "{:x}".format(1) to produce not completely
broken output.
11 years ago
Damien George
b99d9ea258
Add errno=0 before call.
11 years ago
Damien George
613eb25545
stm: Fix print methods with new kind argument.
11 years ago
Damien George
5573f9f150
Merge branch 'str2int' of github.com:xyb/micropython into xyb-str2int
Conflicts:
py/objint.c
unix-cpy/Makefile
unix/Makefile
11 years ago
Damien George
4899ff9470
Merge branch 'str-repr' of github.com:pfalcon/micropython into pfalcon-str-repr
Conflicts:
tests/basics/tests/exception1.py
11 years ago
Damien George
7a9d0c4540
Merge branch 'builtins' of github.com:chipaca/micropython into chipaca-builtins
Added some checks for number of arguments.
Conflicts:
py/mpqstrraw.h
11 years ago
Damien George
11507f4074
Merge branch 'master' of github.com:dpgeorge/micropython
11 years ago
Damien George
d02c6d8962
Implement eval.
11 years ago
Paul Sokolovsky
9953ca432b
Add unbuffered readline() implementation for Raw I/O files.
11 years ago
Damien George
e2fb2baaa4
Implement repr.
11 years ago
Damien George
9528cd66d7
Convert parse errors to exceptions.
Parser no longer prints an error, but instead returns an exception ID
and message.
11 years ago
xyb
3e4ed25138
add more tests and remove debug code
11 years ago
xyb
3270fb4be6
int() test passed
11 years ago
John R. Lenton
fca456bc3c
added filter()
11 years ago
John R. Lenton
39b174e00a
Added map
11 years ago
Paul Sokolovsky
36c4499d36
Implement str() and repr() builtin functions.
11 years ago
Paul Sokolovsky
76d982ef34
type->print(): Distinguish str() and repr() variety by passing extra param.
11 years ago
John R. Lenton
ff8007c7d6
Merge remote-tracking branch 'upstream/master' into builtins
11 years ago
Damien George
24224d7c72
Make GitHub logo/image a JPEG so it's smaller.
11 years ago
John R. Lenton
9daa78943e
added enumerate()
11 years ago
Damien George
c6920d31e2
Merge pull request #170 from chipaca/master
made DEBUG control CFLAGS in Makefiles other than stm as well.
11 years ago
Damien George
0367ad6214
stm: Include libgcc for __aeabi_d2f and __aeabi_f2d functions.
Thanks to Dave Hylands for this.
11 years ago
Damien George
36b35c041b
Merge pull request #163 from Metallicow/README-branch
Add combined image to GitHub front page README.md
11 years ago
Damien George
a04a33fee7
Merge pull request #175 from iabdalkader/master
Add missing ADC driver
11 years ago
Damien George
11cc694aa0
Merge pull request #173 from pfalcon/file-readall
Generic implementation if stream readall() method, immediately reused in unix io.FileIO implementation
11 years ago
Damien George
39eab8de96
Merge pull request #161 from pfalcon/exc-more-pythonic
Move towards Python-compliant interface of exceptions
11 years ago
Damien George
66a5bf681d
Merge pull request #142 from chipaca/containment
Implemented support for `in` and `not in` operators.
11 years ago
Damien George
0f59203e37
Tidy up.
11 years ago
Damien George
6c2401e935
Merge pull request #165 from chipaca/builtins
added zip()
11 years ago
Paul Sokolovsky
8bc96471f0
Implement "is" and "is not" operators.
So far, don't work for strings as expected.
11 years ago
Paul Sokolovsky
ddf2178d83
Refactor exception objects to have better impl of Python-side interface.
This implements internal args tuple of arguments, while still keeping
object useful for reporting C-side errors.
Further elaboration is needed.
11 years ago
Paul Sokolovsky
8eec8bcad9
Add objtuple.h to allow embedding of tuples inside other objects.
This is useful because tuple is closest analog of C static array.
11 years ago
mux
8c10240722
Add ADC support for internal TEMP/VBAT/VREF
* Add ADC support for reading internal temperature sensor.
* Add ADC support for reading internal VREF/VBAT monitor.
11 years ago
mux
3591285091
Implement initial ADC support
* Add simple ADC driver, with support for ADC1 and all channels.
* Export MicroPython ADC object with read_channel function.
* Add stm32f4xx_adc.c and adc.c to Makefile.
11 years ago
mux
b4e374f138
Add missing ADC driver
* Add missing ADC driver from STM32F4xx_StdPeriph_Lib_V1.3.0
11 years ago
xyb
82e61bdc24
support int(str, basbase)
11 years ago
xyb
c178ea471e
Implemented int(str) in UNIX
11 years ago
John R. Lenton
93451002f0
Merge remote-tracking branch 'upstream/master' into builtins
Conflicts:
py/builtin.c
py/builtin.h
py/runtime.c
11 years ago
John R. Lenton
f5a0a7d2b3
Merge remote-tracking branch 'upstream/master' into containment
11 years ago
John R. Lenton
10d2f72860
Merge remote-tracking branch 'upstream/master'
11 years ago
Paul Sokolovsky
5225450b9f
Add generic impl of stream .readall() method. Use one for unix io.FileIO.
11 years ago
Paul Sokolovsky
5d2499c638
Add "buffer management" and "shrink" API calls to vstr.
vstr is initially intended to deal with arbitrary-length strings. By
providing a bit lower-level API calls, it will be also useful to deal
with arbitrary-length I/O buffers (the difference from strings is that
buffers are filled from "outside", via I/O).
Another issue, especially aggravated by I/O buffer use, is alloc size
vs actual size length. If allocated 1Mb for buffer, but actually
read 1 byte, we don't want to keep rest of 1Mb be locked by this I/O
result, but rather return it to heap ASAP ("shrink" buffer before passing
it to qstr_from_str_take()).
11 years ago
Paul Sokolovsky
ca318bba0d
mp_obj_equal(): Compare small and long ints properly.
By dispatching to long int methods.
11 years ago
Paul Sokolovsky
76a90f2f60
Move mp_obj_int_t definition to objint.h, to reuse in long int impls.
11 years ago
John R. Lenton
88cb1e60e0
Made sorted() raise an exception instead of aborting when given no arguments; moved around some things in objfun.c as a consequence
11 years ago