Fix issue in wx event loop activation in shell.
@@ -114,6 +114,9 @@ def inputhook_wx3():
try:
app = wx.GetApp() # @UndefinedVariable
if app is not None:
+ if hasattr(wx, 'IsMainThread'):
+ assert wx.IsMainThread() # @UndefinedVariable
+ else:
assert wx.Thread_IsMain() # @UndefinedVariable
# The import of wx on Linux sets the handler for signal.SIGINT
