Re: Python loop and web server (bottle) in the same script (Posting On Python-List Prohibited)

2017-11-29 Thread zljubisic
Processing is I/O and CPU bound. :( -- https://mail.python.org/mailman/listinfo/python-list

Re: Python loop and web server (bottle) in the same script (Posting On Python-List Prohibited)

2017-11-24 Thread Gregory Ewing
Lawrence D’Oliveiro wrote: I naturally concluded that you didn’t care about updates being momentarily held up by a web request in progress--which would happen anyway if you used threads, at least with CPython. Not necessarily -- the web processing is probably I/O bound, in which case the GIL

Re: Python loop and web server (bottle) in the same script (Posting On Python-List Prohibited)

2017-11-24 Thread zljubisic
That's right. Update task has precedence. Looks like it is not an easy task. Regards. -- https://mail.python.org/mailman/listinfo/python-list

Re: Python loop and web server (bottle) in the same script (Posting On Python-List Prohibited)

2017-11-24 Thread Gregory Ewing
Lawrence D’Oliveiro wrote: On Friday, November 24, 2017 at 3:27:17 AM UTC+13, zlju...@gmail.com wrote: Looks like I need some sort of parallelization. This is why coroutines were added to Python. Threading is notoriously bug-prone, and is best avoided in most situations. The OP claimed

Re: Python loop and web server (bottle) in the same script

2017-11-23 Thread Chris Angelico
On Fri, Nov 24, 2017 at 1:27 AM, wrote: > I would like to have a script that collects data every minute and at the same > time serve newly collected data as web pages. > > Timely collecting data is more important than serving web pages, so > collecting data should have

Python loop and web server (bottle) in the same script

2017-11-23 Thread zljubisic
I would like to have a script that collects data every minute and at the same time serve newly collected data as web pages. Timely collecting data is more important than serving web pages, so collecting data should have priority and should never be interrupted by serving web pages. My first