Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stopping a wsgiref server programmatically

11 views
Skip to first unread message

Gilles Lenfant

unread,
Jan 14, 2014, 6:21:03 AM1/14/14
to
Hi,

I made a small / minimal wsgiref HTTP server dedicated to unittest stubs (testing custom REST client and other likes) that works pretty good in a separate thread.

https://gist.github.com/glenfant/7369894

Feel free to reuse it in your own unittest stubs/mocks.

But it only works like a charm in an Unix box, due to the use of a control pipe ( https://gist.github.com/glenfant/7369894#file-pipetestserver-py-L118 ) that's checked with select.select ( https://gist.github.com/glenfant/7369894#file-pipetestserver-py-L133 ) and can be stopped on request when writing in that pipe ( https://gist.github.com/glenfant/7369894#file-pipetestserver-py-L173 ).

Is there a volunteer with a Windows box for helping me to get it fixed. Note: I have no windows box to experiment alternate.

Many thanks by advance.
--
Gilles Lenfant
0 new messages