Skip to content

Commit

Permalink
[pyroot] make Mac and Linux events handling similar
Browse files Browse the repository at this point in the history
In non-interactive mode one have to run events from special thread,
in interactive it should be enough to use input hook
  • Loading branch information
linev committed Sep 28, 2023
1 parent 2fbeb5f commit 06b86c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/pyroot/pythonizations/python/ROOT/_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def init_graphics(self):
if self._is_ipython and 'IPython' in sys.modules and sys.modules['IPython'].version_info[0] >= 5:
# ipython and notebooks, register our event processing with their hooks
self._ipython_config()
elif sys.flags.interactive == 1 or not hasattr(__main__, '__file__') or gSystem.InheritsFrom('TMacOSXSystem'):
elif sys.flags.interactive == 1 or not hasattr(__main__, '__file__'):
# Python in interactive mode, use the PyOS_InputHook to call our event processing
# - sys.flags.interactive checks for the -i flags passed to python
# - __main__ does not have the attribute __file__ if the Python prompt is started directly
Expand Down

0 comments on commit 06b86c3

Please sign in to comment.