From c13e7b0f873e4857f1ce7924c0a72609df3ddca2 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Fri, 24 Jul 2020 01:08:02 +0530 Subject: platform independent library and image paths, flake8 compliant --- src/configuration/Appconfig.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/configuration/Appconfig.py') diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 6a10f3d7..a079d472 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -13,7 +13,7 @@ # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in # ORGANIZATION: eSim team at FOSSEE, IIT Bombay. # CREATED: Tuesday 24 February 2015 -# REVISION: Friday 14 February 2020 +# REVISION: Friday 24 July 2020 # ========================================================================= from PyQt4 import QtGui @@ -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: -- cgit From 2eb6697de529a643127599070771a0278e9817b3 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Mon, 3 Aug 2020 12:03:41 +0530 Subject: ported GUI to PyQt5 --- src/configuration/Appconfig.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/configuration/Appconfig.py') diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index a079d472..94abb44c 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 24 July 2020 +# REVISION: Saturday 25 July 2020 # ========================================================================= -from PyQt4 import QtGui +from PyQt5 import QtWidgets import os import json from configparser import SafeConfigParser -class Appconfig(QtGui.QWidget): +class Appconfig(QtWidgets.QWidget): """ All configuration goes here. May change in future for code optimization. @@ -102,7 +102,7 @@ class Appconfig(QtGui.QWidget): super(Appconfig, self).__init__() # Application Details self._APPLICATION = 'eSim' - self._VERSION = 'v2.0.0' + self._VERSION = 'v2.1.0' self._AUTHOR = 'Fahim, Rahul' # Application geometry setting -- cgit From a236dc440e2242cc9b0005befb56c84980a4ca47 Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Mon, 3 Aug 2020 12:48:56 +0530 Subject: replaced deprecated SafeConfigParser with ConfigParser --- src/configuration/Appconfig.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/configuration/Appconfig.py') diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 94abb44c..96514f85 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -13,13 +13,13 @@ # MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in # ORGANIZATION: eSim Team at FOSSEE, IIT Bombay # CREATED: Tuesday 24 February 2015 -# REVISION: Saturday 25 July 2020 +# REVISION: Sunday 02 August 2020 # ========================================================================= from PyQt5 import QtWidgets import os import json -from configparser import SafeConfigParser +from configparser import ConfigParser class Appconfig(QtWidgets.QWidget): @@ -63,7 +63,7 @@ class Appconfig(QtWidgets.QWidget): noteArea = {"Note": []} - parser_esim = SafeConfigParser() + parser_esim = ConfigParser() parser_esim.read( os.path.join( os.path.expanduser("~"), @@ -100,10 +100,12 @@ class Appconfig(QtWidgets.QWidget): def __init__(self): super(Appconfig, self).__init__() + # Application Details self._APPLICATION = 'eSim' - self._VERSION = 'v2.1.0' - self._AUTHOR = 'Fahim, Rahul' + self._VERSION = '2.1' + self._AUTHOR = 'Fahim' + self._REVISION = 'Rahul' # Application geometry setting self._app_xpos = 100 -- cgit From 7871e58975d75eb2b02928f7a48d29113bebeb2b Mon Sep 17 00:00:00 2001 From: rahulp13 Date: Sat, 8 Aug 2020 19:06:45 +0530 Subject: resolved pep8 issues --- src/configuration/Appconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/configuration/Appconfig.py') diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 96514f85..d0b4fd18 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -100,7 +100,7 @@ class Appconfig(QtWidgets.QWidget): def __init__(self): super(Appconfig, self).__init__() - + # Application Details self._APPLICATION = 'eSim' self._VERSION = '2.1' -- cgit