Skip to content

Commit

Permalink
Backport PR ipython#12375: BF: wx inputhook
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau authored and meeseeksmachine committed Jun 8, 2020
1 parent 4577575 commit 4a74260
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 4a74260

Please sign in to comment.