[PyQt] Add Unix signal handler class to PyQt

Kovid Goyal kovid at kovidgoyal.net
Tue Aug 2 09:04:10 BST 2016


On Tue, Aug 02, 2016 at 01:21:36PM +0530, Kovid Goyal wrote:
> On Tue, Aug 02, 2016 at 08:11:22AM +0200, Florian Bruhin wrote:
> > FWIW I implemented something similar in Python, and it's relatively
> > straight-forward:
> > 
> > https://github.com/The-Compiler/qutebrowser/blob/v0.8.1/qutebrowser/misc/crashsignal.py#L272-L398
> 
> For unix it is possible thanks to signal.set_wakeup_fd, but on windows
> as far as I know, you would have to use QTimer to poll for signals,
> which is sub-optimal for obvious reasons.

Well, I just looked at the docs for set_wakeup_fd and at least for
python >= 3.5 it supports sockets on windows, so it should be possible
to make it work there as well.

@Phil: So this is only necessary for python versions < 3.5. It's up to
you whether you still think it important enough.

Kovid.

-- 
_____________________________________

Dr. Kovid Goyal 
http://www.kovidgoyal.net
http://calibre-ebook.com
_____________________________________


More information about the PyQt mailing list