How to write a non blocking SimpleHTTPRequestHandler ?

Filadelfo Fiamma philosganga at gmail.com
Tue Feb 3 10:03:47 EST 2015


I think You can try the asyncore lib:
https://docs.python.org/2/library/asyncore.html


2015-02-03 15:50 GMT+01:00 Yassine Chaouche <
yacinechaouche at yahoo.com.dmarc.invalid>:

> On Tuesday, February 3, 2015 at 3:17:37 PM UTC+1, Amirouche Boubekki wrote:
> > What you want is to prevent the socket to wait indefinetly for data
> (based on strace output) which is done with socket.setblocking/settimeout
> [1]
>
> Exactly ! thanks for taking time to reading my original post a second
> time. Maybe I didn't express my problem well enough and the discussion has
> maybe drifted to an XYProblem type discussion :)
>
> I was about to say that most webframeworks for python already take care of
> the problem I'm facing, so I certainly confused people with improper
> formulation.
>
> > There is contentbrowser [2] which is somekind of web proxy.
>
> It's using werkzeug and it seems to be a full web application. I just want
> something that is right above sockets and selects. All that my script is
> doing is grabbing some json data from an external url provided by the
> browser and return a formatted page showing the json data in human-readable
> HTML pages. Nothing fancy.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Filadelfo Fiamma
mail: philosganga at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150203/238a11d4/attachment.html>


More information about the Python-list mailing list