Skip to content

Commit aa58888

Browse files
committed
Add debug statements to observe loop
1 parent c2484fb commit aa58888

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • IPython/terminal/pt_inputhooks

‎IPython/terminal/pt_inputhooks/qt.py‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def _reclaim_excepthook():
2020
sys.excepthook = shell.excepthook
2121

2222

23+
announced = 0
24+
25+
2326
def inputhook(context):
2427
global _appref
2528
app = QtCore.QCoreApplication.instance()
@@ -57,6 +60,15 @@ def inputhook(context):
5760

5861
event_loop = QtCore.QEventLoop(app)
5962

63+
global announced
64+
if announced == 0:
65+
print(f"`inputhook` running Qt {QtCore.qVersion()} event loop.")
66+
announced += 1
67+
elif announced == 10:
68+
announced = 0
69+
else:
70+
announced += 1
71+
6072
if sys.platform == 'win32':
6173
# The QSocketNotifier method doesn't appear to work on Windows.
6274
# Use polling instead.

0 commit comments

Comments
 (0)