summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoranjalijaiswal082019-05-27 15:44:56 +0530
committernilshah982019-06-07 11:03:16 +0530
commit11796de3a3bbb0568d44c18ba6ff3d5e14b7407f (patch)
tree175500f67ac2f8ab04a43ab84981365e5f8882c9 /src
parent28d8fd378bf717e8daba8a564708856769f24b98 (diff)
downloadeSim-11796de3a3bbb0568d44c18ba6ff3d5e14b7407f.tar.gz
eSim-11796de3a3bbb0568d44c18ba6ff3d5e14b7407f.tar.bz2
eSim-11796de3a3bbb0568d44c18ba6ff3d5e14b7407f.zip
configuration made pep8 compliant + documentation
Diffstat (limited to 'src')
-rw-r--r--src/configuration/Appconfig.py132
1 files changed, 66 insertions, 66 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py
index b2aaa0f7..40bb8ef6 100644
--- a/src/configuration/Appconfig.py
+++ b/src/configuration/Appconfig.py
@@ -1,20 +1,20 @@
-#=========================================================================
+# =========================================================================
#
# FILE: Appconfig.py
-#
-# USAGE: ---
-#
-# DESCRIPTION: This define all configuration used in Application.
-#
+#
+# USAGE: ---
+#
+# DESCRIPTION: This define all configuration used in Application.
+#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Fahim Khan, fahim.elex@gmail.com
# ORGANIZATION: eSim team at FOSSEE, IIT Bombay.
-# CREATED: Wednesday 04 February 2015
+# CREATED: Wednesday 04 February 2015
# REVISION: ---
-#=========================================================================
+# =========================================================================
from PyQt4 import QtGui
@@ -24,62 +24,62 @@ from configparser import SafeConfigParser
class Appconfig(QtGui.QWidget):
- """
- All configuration goes here.
- May change in future for code optimization.
- """
-
- #Home directory
- home = os.path.join(os.path.expanduser("~"),"eSim-Workspace")
- default_workspace = {"workspace":home}
- #Current Project detail
- current_project = {"ProjectName":None}
- #Current Subcircuit detail
- current_subcircuit = {"SubcircuitName":None}
- #Workspace detail
- workspace_text = '''eSim stores your project in a folder called a eSim-Workspace. You can choose a different workspace folder to use for this session.'''
- procThread_list = []
- proc_dict={} #holds the pids of all external windows corresponds to the current project
- dock_dict={} #holds all dockwidgets
- dictPath = os.path.join(os.path.expanduser("~"), ".projectExplorer.txt")
- noteArea = {}
+ """
+ All configuration goes here.
+ May change in future for code optimization.
+ """
+
+ # Home directory
+ home = os.path.join(os.path.expanduser("~"), "eSim-Workspace")
+ default_workspace = {"workspace": home}
+ # Current Project detail
+ current_project = {"ProjectName": None}
+ # Current Subcircuit detail
+ current_subcircuit = {"SubcircuitName": None}
+ # Workspace detail
+ workspace_text = '''eSim stores your project in a folder called a \
+ eSim-Workspace. You can choose a different workspace folder to use\
+ for this session.'''
+ procThread_list = []
+ proc_dict = {}
+ # holds the pids of all external windows corresponds to the current project
+ dock_dict = {} # holds all dockwidgets
+ dictPath = os.path.join(os.path.expanduser("~"), ".projectExplorer.txt")
+ noteArea = {}
+
+ parser_esim = SafeConfigParser()
+ parser_esim.read(
+ os.path.join(
+ os.path.expanduser("~"),
+ os.path.join(
+ '.esim',
+ 'config.ini')))
+ # Need to comment below line to execute on Windows 10
+ # modelica_map_json = parser_esim.get('eSim', 'MODELICA_MAP_JSON')
+ try:
+ project_explorer = json.load(open(dictPath))
+ except BaseException:
+ project_explorer = {}
+ process_obj = []
+
+ def __init__(self):
+ super(Appconfig, self).__init__()
+ # Application Details
+ self._APPLICATION = 'eSim'
+ self._VERSION = 'v1.1'
+ self._AUTHOR = 'Fahim'
+
+ # Application geometry setting
+ self._app_xpos = 100
+ self._app_ypos = 100
+ self._app_width = 600
+ self._app_heigth = 400
+
+ def print_info(self, info):
+ self.noteArea['Note'].append('[INFO]: ' + info)
+
+ def print_warning(self, warning):
+ self.noteArea['Note'].append('[WARNING]: ' + warning)
- parser_esim = SafeConfigParser()
- parser_esim.read(os.path.join(os.path.expanduser("~"), os.path.join('.esim','config.ini')))
- modelica_map_json = parser_esim.get('eSim', 'MODELICA_MAP_JSON')
- try:
- project_explorer = json.load(open(dictPath))
- except:
- project_explorer= {}
- process_obj = []
-
- def __init__(self):
- super(Appconfig, self).__init__()
- #Application Details
- self._APPLICATION = 'eSim'
- self._VERSION = 'v1.1'
- self._AUTHOR = 'Fahim'
-
- #Application geometry setting
- self._app_xpos = 100
- self._app_ypos = 100
- self._app_width = 600
- self._app_heigth = 400
-
-
- def print_info(self, info):
- self.noteArea['Note'].append('[INFO]: ' + info)
-
-
- def print_warning(self, warning):
- self.noteArea['Note'].append('[WARNING]: ' + warning)
-
-
- def print_error(self, error):
- self.noteArea['Note'].append('[ERROR]: ' + error)
-
-
-
-
-
-
+ def print_error(self, error):
+ self.noteArea['Note'].append('[ERROR]: ' + error)