Qt6 pour GNU/Linux et wxPython pour Windows

This commit is contained in:
Philippe Roy 2023-01-30 06:36:11 +00:00
parent 22b4853344
commit c0084794c3
2 changed files with 15 additions and 8 deletions

View File

@ -473,7 +473,11 @@ def file_open():
scene.objects['System']['file_proc'].terminate()
# Démarrer le processus file
if sys.platform=="linux": # wxPython ne s'installe pas bien sur GNU/linux -> Qt6
scene.objects['System']['file_proc'] = subprocess.Popen([sys.executable, os.path.join(os.getcwd(), "twin_file_qt.py")], stdout=subprocess.PIPE, encoding = 'utf8')
else: # Qt6 ne s'installe pas bien sur Windows -> wxPython
scene.objects['System']['file_proc'] = subprocess.Popen([sys.executable, os.path.join(os.getcwd(), "twin_file_wx.py")], stdout=subprocess.PIPE, encoding = 'utf8')
stout = scene.objects['System']['file_proc'].communicate()
if stout[0][:-1] != 'None':
scene.objects['System']['script'] = stout[0][:-1]

View File

@ -160,7 +160,10 @@ def plot(data_groups):
##
def plot_generate_thread(csv_file):
if sys.platform=="linux": # wxPython ne s'installe pas bien sur GNU/linux -> Qt6
command = sys.executable + " " + os.path.join(sys.executable, os.getcwd(), "twin_plot_qt.py") + " "+ csv_file
else: # Qt6 ne s'installe pas bien sur Windows -> wxPython
command = sys.executable + " " + os.path.join(sys.executable, os.getcwd(), "twin_plot_wx.py") + " "+ csv_file
os.system(command)
def plot_generate(threads):