Skip to content

Commit

Permalink
Merge pull request #12375 from pauldmccarthy/rf/wx_inputhook
Browse files Browse the repository at this point in the history
BF: wx inputhook
  • Loading branch information
Carreau committed Jun 8, 2020
2 parents 4f0c46c + e0030b7 commit a80908b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion IPython/terminal/pt_inputhooks/wx.py
Expand Up @@ -177,11 +177,13 @@ def inputhook_wxphoenix(context):

# Use a wx.Timer to periodically check whether input is ready - as soon as
# it is, we exit the main loop
timer = wx.Timer()

def poll(ev):
if context.input_is_ready():
timer.Stop()
app.ExitMainLoop()

timer = wx.Timer()
timer.Start(poll_interval)
timer.Bind(wx.EVT_TIMER, poll)

Expand Down

0 comments on commit a80908b

Please sign in to comment.