diff options
author | Rahul P | 2020-08-08 19:16:28 +0530 |
---|---|---|
committer | GitHub | 2020-08-08 19:16:28 +0530 |
commit | 8255c72075ab3541e8b6cfa7facb4e016157a905 (patch) | |
tree | e86226cc6a609e54133b527ad71912996360722b /src/configuration/Appconfig.py | |
parent | 175208c2553bde875968a9bc53176b6039ba9360 (diff) | |
parent | 7871e58975d75eb2b02928f7a48d29113bebeb2b (diff) | |
download | eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.tar.gz eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.tar.bz2 eSim-8255c72075ab3541e8b6cfa7facb4e016157a905.zip |
Merge pull request #156 from rahulp13/master
ported GUI to PyQt5; platform independent paths; launch ngspice through mintty on Win OS
Diffstat (limited to 'src/configuration/Appconfig.py')
-rw-r--r-- | src/configuration/Appconfig.py | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 6a10f3d7..d0b4fd18 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -11,18 +11,18 @@ # NOTES: --- # AUTHOR: Fahim Khan, fahim.elex@gmail.com # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in -# ORGANIZATION: eSim team at FOSSEE, IIT Bombay. +# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Tuesday 24 February 2015 -# REVISION: Friday 14 February 2020 +# REVISION: Sunday 02 August 2020 # ========================================================================= -from PyQt4 import QtGui +from PyQt5 import QtWidgets import os import json -from configparser import SafeConfigParser +from configparser import ConfigParser -class Appconfig(QtGui.QWidget): +class Appconfig(QtWidgets.QWidget): """ All configuration goes here. May change in future for code optimization. @@ -63,7 +63,7 @@ class Appconfig(QtGui.QWidget): noteArea = {"Note": []} - parser_esim = SafeConfigParser() + parser_esim = ConfigParser() parser_esim.read( os.path.join( os.path.expanduser("~"), @@ -80,7 +80,12 @@ class Appconfig(QtGui.QWidget): # Open file and read KiCad config path try: - file = open('library/supportFiles/kicad_config_path.txt', 'r') + init_path = '../../' + if os.name == 'nt': + init_path = '' + + file = open(init_path + + 'library/supportFiles/kicad_config_path.txt', 'r') kicad_path = file.read().rstrip() file.close() except BaseException as e: @@ -95,10 +100,12 @@ class Appconfig(QtGui.QWidget): def __init__(self): super(Appconfig, self).__init__() + # Application Details self._APPLICATION = 'eSim' - self._VERSION = 'v2.0.0' - self._AUTHOR = 'Fahim, Rahul' + self._VERSION = '2.1' + self._AUTHOR = 'Fahim' + self._REVISION = 'Rahul' # Application geometry setting self._app_xpos = 100 |