def signal_handler(self, signum, frame):
print "Signal handler called with signal %d" % (signum)
in my wxApp
class AppPyLisiere(wxApp):
""" Main application object."""
def OnInit(self):
or in my main frame
class FrameMain(wxFrame):
""" Main frame."""
def __init__(self, *args, **kwds):
but it's always the same, i launch the application, i send a SIGUSR1
signal with "kill -10 PID" and nothing append, the print is done only when
i close the application.
You can try to open a wxMessageBox, it will open only when you close the
application.
In an application without GUI, it works fine but not when i use wxPython,
is there a special way to handle the signal ?
but it's always the same, i launch the application, i send a SIGUSR1
signal with "kill -10 PID" and nothing append, the print is done only when
i close the application.
You can try to open a wxMessageBox, it will open only when you close the
application.
In an application without GUI, it works fine but not when i use wxPython,
is there a special way to handle the signal ?
I've investigated this before and never found a solution, nor even an idea of what the cause might be. The signal handlers just are not called until after MainLoop returns. If anybody wants to look into this I'll gladly apply a patch that fixes it.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
but it's always the same, i launch the application, i send a SIGUSR1
signal with "kill -10 PID" and nothing append, the print is done only when
i close the application.
In an application without GUI, it works fine but not when i use wxPython,
is there a special way to handle the signal ?
I've investigated this before and never found a solution, nor even an idea of what the cause might be. The signal handlers just are not called until after MainLoop returns. If anybody wants to look into this I'll gladly apply a patch that fixes it.
could you setup and use all the signal handling code in another thread? then you'd need to use wxCallAfter() or the like to notify your app.
It may be worth a try.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
but it's always the same, i launch the application, i send a SIGUSR1
signal with "kill -10 PID" and nothing append, the print is done only when
i close the application.
In an application without GUI, it works fine but not when i use wxPython,
is there a special way to handle the signal ?
I've investigated this before and never found a solution, nor even an idea of what the cause might be. The signal handlers just are not called until after MainLoop returns. If anybody wants to look into this I'll gladly apply a patch that fixes it.
could you setup and use all the signal handling code in another thread? then you'd need to use wxCallAfter() or the like to notify your app.
No, Python only delivers signals to the main thread.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!