Romain Goyet
b67388a9a9
[python] Enable builtins set
2018-06-08 17:26:37 +02:00
Romain Goyet
8094a02e71
[python] Don't compile MICROPY_HELPER_REPL for nothing
2018-06-08 17:26:37 +02:00
Romain Goyet
96846e9396
[python] Clean up the configuration files
2018-06-04 16:10:14 +02:00
Romain Goyet
73250e727a
[python] Update to MicroPython 1.9.4
2018-06-04 16:10:14 +02:00
Romain Goyet
21b5e898c3
Enable the urandom module in mpconfigport.h, not in uPy
...
Otherwise it breaks when upgrading uPy. Faulty commit 4011290 .
2018-04-13 09:39:14 +02:00
Romain Goyet
8aef4d996c
[python] Restore the should_interrupt routine
2018-04-11 10:27:18 +02:00
Romain Goyet
b691d3d6ed
Merge branch 'usb'
2018-04-09 14:48:18 +02:00
Romain Goyet
8745a258d4
Remove un-needed headers
...
This fixes some heavily-parallels build failures
2018-04-09 14:43:35 +02:00
Romain Goyet
55e4c955f4
Upgrade to MicroPython 1.9.3
2018-04-09 14:43:15 +02:00
Léa Saviot
1d21b4ed9e
[python] Remove un-necessary dependencies.
...
Change-Id: Ib3542c364ae8f670372cc848f6b59d7c7364817d
2018-04-09 10:50:51 +02:00
Léa Saviot
704e02f765
[python] Add qstrdefs.generated.h to generated_headers in Makefile.
...
This fixes a compilation bug when building without "-j8".
Change-Id: Ic30d379837ab685843f011c3dba01e3d38d2402a
2018-04-06 14:31:44 +02:00
Romain Goyet
3ad7b941dd
Define and use PYTHON in the build system
2018-02-18 15:21:15 +01:00
Romain Goyet
489b26e813
Re-organize and re-prefix the Makefile variables
2018-02-02 14:30:35 +01:00
Romain Goyet
fd7516f8ac
[python] "input" now displays the provided prompt
2018-02-01 14:10:26 +01:00
Romain Goyet
651d5715e4
[python] Adding mp_hal_input
2018-02-01 14:10:26 +01:00
Émilie Feral
5c23003e50
[apps] Python: Refining random module
2018-01-16 13:19:27 +01:00
MaxBzh
4011290e7a
Add Urandom module in Python
2018-01-05 14:28:25 +01:00
Léa Saviot
f7766080c3
[python] Fixed the list[:] function.
2017-12-12 09:42:30 +01:00
Léa Saviot
2a0bc95097
[python] Fix min/max functions.
2017-12-12 09:42:10 +01:00
Léa Saviot
1ce6f36651
[code] Fixed the wait for user input after drawing using Python.
...
A SandboxController is now pushed on the StackViewController and sets the
KDIonContext::sharedContext before drawing, sets a white background and handles
user input after the Python computation to dismiss the drawing screen.
Change-Id: I51b0474365a85e845227379a16d090541fa8ded7
2017-12-01 13:19:28 +01:00
Léa Saviot
9a9ccc7a8c
[python] Fixed MicroPython emscripten bug.
...
Micropython did not work because of two problems:
- the stack in ascending order on emscripten
- if optimized, some variables may be stored in local JavaScript
variables, which breaks garbage collection.
Change-Id: Ib454e0c4d995e9f5f85370eea758526119b35773
2017-12-01 12:06:05 +01:00
Léa Saviot
805bdd1381
[python] Fixed infinite recursion bug.
...
When running a script with infinite recursion, micropython now throws an
error instead of aborting and rebooting the device.
Change-Id: Icd409e56de58a48b25b6bdb30eea1e70b344cc14
2017-12-01 12:06:05 +01:00
Léa Saviot
9d82804ff3
[code/emscripten] On emscripten, fixed waiting after a Python drawing.
...
The user can now push OK or Back to remove a Python drawing.
Change-Id: I293064a9458f8c0c6d0da5351500600fd9e82706
2017-12-01 12:06:05 +01:00
Léa Saviot
6ccd0c1c55
[python] Fixed the Python stack length computation.
...
On the device, the stack is stored in reverse order, but it might not be
the case on other platforms, which changes stack length computation.
Change-Id: I0218224a77465b9672f137771c00f734fdfaea64
2017-11-22 09:53:34 +01:00
Léa Saviot
a9f4da92c0
[code/python] Fixed the Kandinsky module in Python.
...
User can draw on the 320*220 drawing screen.
Change-Id: I25034b05f21aacc35608358fdb7a4d9924dd22e8
2017-11-21 17:12:38 +01:00
Léa Saviot
b73170b77b
[code] Print errors in the Python console.
...
Change-Id: If3a096ee46105229b6c4c77906826e78666cdc11
2017-11-17 14:05:23 +01:00
Léa Saviot
5cc9aa53f2
[python] Fixed underscore missing.
...
Change-Id: I58fb379c9ad070c15fb4d3487baa42f861c40b25
2017-11-17 14:05:23 +01:00
Romain Goyet
024067d8a8
Python: Use MPZ
2017-11-17 12:00:35 +01:00
Léa Saviot
5de4b5cd67
[code] Each script has a name, stored in the accordeon buffer.
...
A script can now be imported in the console.
Moved all the MicroPython functions to python/port files.
Change-Id: I0a23e8cb20005719b800e81470e1c574c702c3b7
2017-11-17 11:59:50 +01:00
Romain Goyet
9fa5ac0acf
[python] Use the extended math functions
2017-11-17 11:59:49 +01:00
Romain Goyet
440813bdc3
[python] Switch to using doubles
2017-11-17 11:59:49 +01:00
Romain Goyet
247ea217fa
[python] Enable the cmath module
2017-11-17 11:59:49 +01:00
Romain Goyet
2283736dfe
[python] Enable the math module
2017-11-17 11:59:49 +01:00
Ian Abbott
9a99af88aa
[python] Fix type of n_args parameter of mp_builtin_open()
...
The n_args parameter of mp_builtin_open() has type size_t in
"python/src/py/builtin.h", and type uint in "python/port/port.c".
Change it to size_t.
2017-09-20 13:34:47 +02:00
Émilie Feral
52f5858ffd
[python][apps/code] Enable interrupting python execution
...
Change-Id: Iadf7038f79f0289ce20d7ded42f8fe70894f0c0a
2017-08-28 13:30:46 +02:00
Émilie Feral
e0252c7751
[python] Fix garbage collector
...
Change-Id: I529ff93e7f8841574ff24cb1b6461aa48039ab61
2017-08-25 11:20:49 +02:00
Émilie Feral
818c56bd45
[python] Enable float
...
Change-Id: I94111dd821fb3a9ef1e22ae5133c3a48285c52d5
2017-08-25 11:20:49 +02:00
Émilie Feral
adff9d1ef0
[python] garbage collector does not print anything
...
Change-Id: I7da630ea530424878b8ca1f35117fdac67ab574c
2017-08-25 11:20:48 +02:00
Émilie Feral
b50296d9c2
[apps/code] Repare print() in micropython
...
Change-Id: I43c46748b15d83e071c7b7f1e8448384ce5ad77f
2017-08-25 11:20:48 +02:00
Romain Goyet
30471ede35
[apps] The code app runs Python code
...
Change-Id: I6034adeb368db2c5d3b64b16f8ad512750cd3bc0
2017-08-09 15:58:29 +02:00
Émilie Feral
c88b802516
Revert "[python] Do no build nlrthumb.c"
...
This reverts commit 04fade4920 .
Change-Id: I116c43e7bf65f1b538b0353644bf43749c1c31f2
2017-08-09 15:56:47 +02:00
Émilie Feral
04fade4920
[python] Do no build nlrthumb.c
...
Change-Id: I3dc57a27563dfeab3019c1e455907eb2fadbf52a
2017-08-09 09:58:06 +02:00
Émilie Feral
66275c29ab
[python] Fix bug in mpconfigport
...
Change-Id: If020d660f9ac67a94731cf1f77986697826ae624
2017-08-08 17:05:33 +02:00
Romain Goyet
16584c5a88
[python] Initial import of MicroPython 1.9.1
...
Change-Id: I1a8bafe720fb865f9418fc1e50de1184312e1653
2017-08-04 17:56:24 +02:00