First action is to ask for PyLoT.in file.
This commit is contained in:
parent
43eecfe78b
commit
2dda4d8e04
12
QtPyLoT.py
12
QtPyLoT.py
@ -73,6 +73,18 @@ class MainWindow(QMainWindow):
|
|||||||
def __init__(self, parent=None):
|
def __init__(self, parent=None):
|
||||||
super(MainWindow, self).__init__(parent)
|
super(MainWindow, self).__init__(parent)
|
||||||
|
|
||||||
|
# check for default pylot.in-file
|
||||||
|
infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
|
||||||
|
if os.path.isfile(infile)== False:
|
||||||
|
infile = QFileDialog().getOpenFileName(caption='Choose PyLoT-input file')
|
||||||
|
if not os.path.exists(infile[0]):
|
||||||
|
QMessageBox.warning(self, "PyLoT Warning",
|
||||||
|
"No PyLoT-input file declared!")
|
||||||
|
sys.exit(0)
|
||||||
|
self.infile = infile[0]
|
||||||
|
else:
|
||||||
|
self.infile = infile
|
||||||
|
|
||||||
# UI has to be set up before(!) children widgets are about to show up
|
# UI has to be set up before(!) children widgets are about to show up
|
||||||
self.createAction = createAction
|
self.createAction = createAction
|
||||||
# read settings
|
# read settings
|
||||||
|
Loading…
Reference in New Issue
Block a user