Hugo Saint-Vignes
70a628f2c8
[apps] Fix Python assert crash on malloc free
...
Change-Id: I48f86422f7d6af5227e2556e6ef531dfad696da4
2020-11-04 15:30:53 +01:00
Hugo Saint-Vignes
641186d89c
[python] Accept "grey" color
...
Change-Id: Ia9b70eb3b4205ae9571eb4269410c30cfbdd1214
2020-11-04 15:07:20 +01:00
Hugo Saint-Vignes
e27c668c40
[apps,escher,kandinsky,poincare,python] Replace every "grey" with "gray"
...
Change-Id: I60a232849dce90f70e6977b6024d6e9b1ce1b731
2020-11-04 15:07:20 +01:00
Hugo Saint-Vignes
7eb694822d
[python] Add magenta color
...
Change-Id: I7a5e12f6f3d79da802149a6aeef88387941ccdd8
2020-08-11 17:08:23 +02:00
Arthur
59bf8bbcf4
[matplotlib] Added cyan color to the color palette
...
Change-Id: I29476d8148ad98285505adc460b90628573518fa
2020-06-04 14:50:09 +02:00
Émilie Feral
273d10dc26
[python] Change names: ColorParse::ParseColor --> Color::Parse
2020-06-04 14:50:08 +02:00
Émilie Feral
ab69c0069c
[python] Fix alignement issues in MicroPython::collectRootsAtAddress
2020-06-04 14:50:08 +02:00
Léa Saviot
d1c8bbdaf7
[apps/code] The console marks imported script for the var box
...
After lauching the console, if we fetch a script we mark it as fetched.
When the variable box displays variables from imported scripts, it scans
all the variables from the scripts marked as fetched.
2020-06-04 14:50:06 +02:00
Émilie Feral
7f3f67aba0
[python] Clean type confusion
2020-05-18 14:39:46 +02:00
Émilie Feral
4e1f7c1cb8
[python] Fix comment
2020-05-18 14:39:46 +02:00
Émilie Feral
3f6647f3ae
[ion][python] Implement an architecture-dependant collect_registers.
...
setjmp is not guaranteed to collect all registers without modification
on all platforms.
This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.
2020-05-18 14:39:46 +02:00
Émilie Feral
5a32006dcd
[python] Revert: collectRoots does not need to look for unaligned
...
pointers as they should not exist
2020-05-18 14:39:46 +02:00
Émilie Feral
3f5487ca90
[python] Forbid inlining on gc_collect to avoid missing some roots
2020-05-18 14:39:46 +02:00
Émilie Feral
4bca330f0d
[python] Coding style
2020-04-30 14:12:32 +02:00
Émilie Feral
0811221943
[python] Clean port ColorParser
2020-04-30 14:12:32 +02:00
Émilie Feral
7c24f2fc28
[python] Coding style
2020-04-30 14:12:32 +02:00
Émilie Feral
1b0b9e48f5
[python] ColorParser: add a TODO
2020-04-30 14:12:32 +02:00
Émilie Feral
8f5fa50f22
[python] Color: avoid magic number 255, clean code of ColorParser and
...
Turtle::colormode
2020-04-30 14:12:32 +02:00
Émilie Feral
c920df1f76
[python] Change enum class name: ColorModes --> ColorMode
2020-04-30 14:12:32 +02:00
Émilie Feral
995cc04533
[python] Use of mp_obj_is_str instead of MP_OBJ_IS_STR for more
...
consistency
2020-04-30 14:12:32 +02:00
Émilie Feral
a564efcaa5
[python] Fix bug in ParseColor
2020-04-30 14:12:32 +02:00
Émilie Feral
f5e8d4d9bb
[python] Avoid modifying micropython external source, use parsenum.h methods directly
2020-04-30 14:12:32 +02:00
Joachim LF
e76abcf67e
[Python] universal colors
2020-04-30 14:12:32 +02:00
Émilie Feral
7df8c2935a
[python] upgrade to micropython 1.12
2020-04-07 11:28:32 +02:00
Émilie Feral
2738d30684
[python] test: check wether script execution lead to a Python error
2020-04-01 16:39:59 +02:00
Émilie Feral
574eacb69c
[python] matplotlib: flush heap memory when any error is raised
2020-04-01 10:18:09 +02:00
Émilie Feral
61e7ec52e6
[python] matplotlib: make pyplot a submodule of matplotlib
2020-04-01 10:18:09 +02:00
Émilie Feral
fb3f6ab6f3
[apps/code][python] ConsoleController doesn't keep any pointer/boolean to know
...
if the sandbox/matplotlib view controller is displayed. Its state won't be
always right; instead, use the StackViewController depth.
This fixes the following bug: when popping the sandbox/matplotlib view
controller, the first responder token was not given to the console
controller!
2020-04-01 10:18:09 +02:00
Émilie Feral
659da1dff8
[apps][python] ExecutionEnvironment handles hide sand display of sandbox
...
and plot controller the same way
2020-04-01 10:18:08 +02:00
Romain Goyet
6a796f5f7c
[python] Add an "axis" function to the matplotlib module
2020-04-01 10:18:08 +02:00
Léa Saviot
0d8cb0123b
[python/port] Fix user interruption char set up
...
print can be user interrupted, so the interruption char needs to be
set for the whole runCode method
2020-02-20 11:43:31 +01:00
Émilie Feral
18b4514412
[python] port: add a comment abouth how we use setjmp
2020-02-12 15:13:24 +01:00
Émilie Feral
de74aa7e59
[python] Enable PYSTACK for emscripten platform: this "fixes" bug
...
probably due to gc_collect (we suspect that transpiled C does not have
access to javascript variables preventing it from collecting all
required roots and leading to deleting objects prematuraly). Enabling
PyStack reduces the use of the heap and fixes the bug.
2020-02-12 15:13:24 +01:00
Émilie Feral
58acedfd34
[python] Test: inline code to avoid changing runCode behaviour
2020-02-12 15:13:24 +01:00
Léa Saviot
86bd4be03e
[python/port] Fix gc_collect_root on emscripten
...
Any data access should be aligned.
2020-02-12 15:13:22 +01:00
Émilie Feral
37061b9cb5
[python] Fix gc_collect to be sure to get unaligned pointers
2020-02-12 15:13:16 +01:00
Émilie Feral
4b58efbc0a
[python] Fix stack boundary on the device
2020-02-12 15:13:16 +01:00
Émilie Feral
d1e93a2918
[python] Python stack: fix limit
2020-02-12 15:13:16 +01:00
Léa Saviot
a450ce3855
Merge branch 'master' into f7
2019-08-06 17:40:14 +02:00
Léa Saviot
95403c8a91
[python/port] Increase stack limit on emscripten, simulator...
...
The value is quite arbitrary, we just do not want to outperfom the
device but still provide more recursion depth.
2019-06-25 08:37:47 -04:00
Émilie Feral
d07b3382e9
Merge branch 'master' into f7
2019-06-14 13:38:02 -04:00
Émilie Feral
b485319e76
[python] Clean gc_collect and comment to explain potential address
...
sanitize error
2019-06-14 13:37:11 -04:00
Émilie Feral
694fa34315
[ion] Keyboard: change keys name to more explicit ones
2019-04-12 16:56:57 +02:00
Léa Saviot
fdc02ee5e1
[python/port] Fix size of gc collection
2019-01-21 14:23:38 +01:00
Léa Saviot
835c112f2f
[python/port] Clean gc_collect
2019-01-21 14:23:38 +01:00
Léa Saviot
4b306791c0
[python/turtle] Turtle::m_drawn is false if sandbox not displayed
...
This way, Turtle::draw() and erase() are more symetrical and no not
perform themselves if the turtle is already drawn / erased.
2018-12-18 12:05:46 +01:00
Romain Goyet
5748521876
[python/turtle] Try to play well with uPy's GC
2018-11-16 18:33:41 +01:00
Romain Goyet
a9091c933b
[python/turtle] Use a Turtle class
2018-11-16 15:31:31 +01:00
Romain Goyet
22a39a2fd6
[python/turtle] Use a dedicated folder
2018-11-16 10:31:16 +01:00
Jean-Baptiste Boric
464c1a5c95
[python] Initial turtle module
2018-10-27 14:24:36 +02:00