Skip to content

Commit d2958f5

Browse files
committed
Enable "GUI" inputhook only if it's not enabled
1 parent 4e1d8ea commit d2958f5

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/ipython_jl/entrypoints.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ def post_startup_configuration(ip):
1717
from . import ipyext
1818
ip.run_cell(dedent("""
1919
%load_ext {ipyext}
20-
%gui julia
2120
""".format(ipyext=ipyext.__name__)))
2221

2322

src/ipython_jl/ipyext.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ def load_ipython_extension(ip):
5959

6060
from IPython.terminal.pt_inputhooks import register
6161
register("julia", julia_inputhook)
62+
if not ip.active_eventloop:
63+
ip.enable_gui("julia")
6264

6365
ip.set_hook("complete_command", _julia_completer,
6466
re_key=r""".*\bMain\.eval\(["']""")

0 commit comments

Comments
 (0)