Is it possible to run program in python with additional HTTP server in infinite loop?
If I were to face with a problem like this right now, I wold do this:
1) First I'd try figuring out if I can use the event loop of the web framework to execute the code communicating with raspberry-pi asynchronously (i.e. inside of the event handlers).
2) If I failed to find a web framework extensible enough to do what I need or if it turned out that the raspberry-pi part can't be done asynchronously (e.g. it is taking to long to execute), I would figure out what is the difference between threads and processes in python, which of the two can I use in my specific situation and what tools can help me with that.
This answer is as specific as the question (at the time of writting).
I want to run program in infinite loop which handles GPIO in raspberry PI and gets requests in infinite loop (as HTTP server). Is it possible? I tried Flask framework, but infinite loop waits for requests and then my program is executed.