changed appcwd definition, get the script file path

This commit is contained in:
Bachir Soussi Chiadmi
2017-06-06 23:04:57 +02:00
parent b8be88d488
commit 7fd6992a62
2 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -25,9 +25,9 @@ from classes import server, sasscompiler, md2html
# / /___/ /_/ / / / __/
# \____/\____/_/ \___/
class Core():
def __init__(self, parent=None):
def __init__(self, apppath):
# restore previous preferences
self.appcwd = os.getcwd()
self.appcwd = apppath
self.restorePreferences()
self._mw = False
+3 -2
View File
@@ -8,7 +8,7 @@
# @Last modified time: 03-06-2017
# @License: GPL-V3
import sys
import sys, os
from PyQt5.QtWidgets import QApplication
from classes import core, mainwindow
@@ -17,7 +17,8 @@ def main():
app = QApplication(sys.argv)
app.setOrganizationName('figli')
app.setApplicationName('Cascade')
mainappcore = core.Core()
app.path = os.path.dirname(os.path.abspath(__file__))
mainappcore = core.Core(app.path)
mainappwindow = mainwindow.MainWindow(mainappcore)
mainappcore.mainwindow = mainappwindow
sys.exit(app.exec_())