Enabling microdot to run other things while app.run() #122
Replies: 3 comments 22 replies
-
The most common way is to use asyncio, so you were in the right place. The |
Beta Was this translation helpful? Give feedback.
-
Hi, and sorry to hijack this discussion, but I feel it might be related: I am wondering if it is possible to run Microdot (have the server running) while at the same time retain access to rshell or some form of repl prompt. I would like to be able to keep interacting with the rshell after the server has started, either via app.server_start() or app.run(). I have read a bit on asyncio, and tried poking about with it, (also tried AppsByDavideV's code above). Any sort of guidance or assistance would be greatly appreciated (even if to say "nah, what you want isnt really possible"). |
Beta Was this translation helpful? Give feedback.
-
I'm not sure @themeadery as I've never used the webrepl (yet). I believe we might have to modify how the webrepl is started?
But I suspect the above won't work if webrepl is not coded to be asynchronous. (note the a in aiorepl) But I believe you can also access aiorepl over wifi(telnet) and not just serial if thats something you're after. If you end up trying this out with webrepl do report back if possible. I'm curious. =) |
Beta Was this translation helpful? Give feedback.
-
Hi,
great app!
I would like to run other tasks while the server is running and serving pages, but my knowledge about micropython is too low (just started, coming from c/c++ arduino). I tried to play with uasyncio (and even I had a look at the code into microdot_asyncio app.start_server) without lucky.
Is there a way to run other tasks while the server is running?
Thank you so much for answer ;)
Beta Was this translation helpful? Give feedback.
All reactions