Commit dae427a0 authored by Michael Rudolf's avatar Michael Rudolf
Browse files

Opens output folder when finished with processing.

parent 8a06cec0
......@@ -3,7 +3,7 @@
# @Author: M. Rudolf, M. Warsitzka
# @Date: 2019-02-20 12:00:00
# @Last Modified by: M. Rudolf
# @Last Modified time: 2020-09-23 10:44:14
# @Last Modified time: 2020-09-23 13:20:58
"""
RST_pick_GUI.py
......@@ -21,6 +21,7 @@ import sys
import tkinter as tk
import warnings
from tkinter import filedialog, messagebox
import subprocess
import RST_Func as rfnc
......@@ -367,6 +368,18 @@ class RST_pick_GUI(tk.Tk):
pfit, perr, name_fit = rfnc.vst_analysis(exp)
rfnc.plotVST(path_out, exp, pfit, perr, name_fit)
if sys.platform == "linux" or sys.platform == "linux2":
p = subprocess.Popen(
["xdg-open", "%s" % path_out],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.communicate()
elif sys.platform == "darwin":
p = subprocess.Popen(
["open", "%s" % path_out],
stdin=subprocess.PIPE, stdout=subprocess.PIPE)
p.communicate()
elif sys.platform == "win32":
os.startfile(path_out) # pylint: disable=no-member
def closing_menu(self):
"""Shows a confirmation dialogue for closing"""
......@@ -443,14 +456,13 @@ class RST_pick_GUI(tk.Tk):
self.set_data()
def create_default_config(self, path=None):
"""Creates default config in the given path"""
config = configparser.ConfigParser()
config.optionxform = str
if not(path):
path = 'default.ini'
path = '../default.ini'
projectname = 'example'
path_in = 'input/'
path_out = 'output/'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment