[PyQt] Add Unix signal handler class to PyQt
Kovid Goyal
kovid at kovidgoyal.net
Tue Aug 2 08:51:36 BST 2016
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.
>
> > It would be very useful to have this capability in PyQt out of the box.
>
> I can see where you're coming from, but I think PyQt should wrap Qt
> and not random third-party projects ;)
The difference here is that this functionality is easily achievable in
Qt based C++ programs but not in python programs. Therefore, IMO it is
not out of scope for PyQt.
Kovid.
More information about the PyQt
mailing list