Stopping a wsgiref server programmatically

G

Gilles Lenfant

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top