mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-13 17:48:34 +05:00
try to load ngsolve in StartGUI python script (fixes failing ngsolve load from tcl in python packages)
This commit is contained in:
parent
15efa3a8b7
commit
6f4cc7c528
@ -12,10 +12,6 @@ def main():
|
|||||||
# Use Redraw without event handling
|
# Use Redraw without event handling
|
||||||
netgen.Redraw = netgen._Redraw
|
netgen.Redraw = netgen._Redraw
|
||||||
|
|
||||||
try:
|
|
||||||
import ngsolve
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
from .gui import win
|
from .gui import win
|
||||||
th = threading.Thread(target=handle_arguments)
|
th = threading.Thread(target=handle_arguments)
|
||||||
th.start()
|
th.start()
|
||||||
|
@ -2,6 +2,13 @@ import netgen
|
|||||||
|
|
||||||
def StartGUI():
|
def StartGUI():
|
||||||
from tkinter import Tk
|
from tkinter import Tk
|
||||||
|
try:
|
||||||
|
# the GUI tries to load ngsolve.tcl (which loads ngsolve shared libraries)
|
||||||
|
# BUT might fail to load dependencies (like mkl), these are handled by the
|
||||||
|
# ngsolve __init__.py script, so import ngsolve from python already here
|
||||||
|
import ngsolve
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
global win
|
global win
|
||||||
win = Tk()
|
win = Tk()
|
||||||
|
Loading…
Reference in New Issue
Block a user