I'm thinking of a C project that embeds a micropython interpreter.
I'd like the C program to load a python script from hTTP or HTTPS and get the micropython intepreter to execute the script
How practical/hard is this?
Any downsides?
Is it possible to run micropython scripts loaded from hTTP?
Re: Is it possible to run micropython scripts loaded from hTTP?
Hi andrews,
This sort of thing is certainly possible - particularly if you already know how you will retrieve the file via HTTP. There is an example of how to embed MicroPython in a C project here: https://github.com/micropython/micropyt ... /embedding
In addition to the 'mp_lexer_new_from_str_len' function there is also 'mp_lexer_new_from_file' so you should be able to start running MicroPython from a file that you store on your device.
This sort of thing is certainly possible - particularly if you already know how you will retrieve the file via HTTP. There is an example of how to embed MicroPython in a C project here: https://github.com/micropython/micropyt ... /embedding
In addition to the 'mp_lexer_new_from_str_len' function there is also 'mp_lexer_new_from_file' so you should be able to start running MicroPython from a file that you store on your device.
Re: Is it possible to run micropython scripts loaded from hTTP?
@jickster yes I mean load and run a .py file from http
Re: Is it possible to run micropython scripts loaded from hTTP?
This answer should give you what you need.oclyke wrote:Hi andrews,
This sort of thing is certainly possible - particularly if you already know how you will retrieve the file via HTTP. There is an example of how to embed MicroPython in a C project here: https://github.com/micropython/micropyt ... /embedding
In addition to the 'mp_lexer_new_from_str_len' function there is also 'mp_lexer_new_from_file' so you should be able to start running MicroPython from a file that you store on your device.
Reply if you need more help.
Sent from my iPad using Tapatalk Pro