I don't run python on my arduino so I can't help you.
I think there is a micropython that adafruit uses for some of their boards.
Thats the only python I know that works on these types of boards and probably what
you want to check out. Micrpython is special version of python for embedded boards
Here is what I am seeing in the Arudino Kernel log:
[ 2498.878229] Out of memory: Kill process 6586 (python) score 422 or sacrifice child
[ 2498.881765] Killed process 6586 (python) total-vm:31716kB, anon-rss:26008kB, file-rss:24kB, shmem-rss:0kB
[ 2499.039888] oom_reaper: reaped process 6586 (python), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Here is what I am seeing in the Arudino Kernel log:
[ 2498.878229] Out of memory: Kill process 6586 (python) score 422 or sacrifice child
[ 2498.881765] Killed process 6586 (python) total-vm:31716kB, anon-rss:26008kB, file-rss:24kB, shmem-rss:0kB
[ 2499.039888] oom_reaper: reaped process 6586 (python), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB