From 9b62d636d91b30f6d8659fe9d94f8343c7c6d3e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Tue, 2 Oct 2018 11:50:26 +0200 Subject: [PATCH] jupyter magic --- python/gui.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/gui.py b/python/gui.py index c9e73ef8..35fa1f34 100644 --- a/python/gui.py +++ b/python/gui.py @@ -11,5 +11,12 @@ def StartGUI(): win.tk.eval('load "'+netgen._netgen_lib_dir.replace('\\','/')+'/libgui[info sharedlibextension]" gui') win.tk.eval( netgen.libngpy._meshing._ngscript) + try: + from IPython import get_ipython + ipython = get_ipython() + ipython.magic('gui tk') + except: + pass + if not netgen.libngpy._meshing._netgen_executable_started: StartGUI()