Download file as chunks

  • So, I'm trying to download a file (a python script) from github as part of my game-project (in micropython). The problem is that I always run out of memory, and was wondering if there's a way to download it with minimal memory usage. I'd like to:
    -Not use custom libraries. (Use the ones that are flashed in default m5stack firmware)
    -Not run a separate python program to download the file

    urequests as chunk isn't implemented, subprocesses I think don't work either... so is there away? (short of splitting the file itself)


    (using the m5stack base one without PSRAM)

  • Maybe the only way is to ask m5stack engineers to add urllib.request to standard libs? :O

  • Can you split it into levels or zones
    The black core?

    Do you still get the same issue if the file is stored on an SDcard?
    Have you trying compression code tricks used in MP or plane python to reduce memory use?

  • Black core, yes. I managed to do it by using the usocket library directly.