summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFahim2016-02-05 11:33:44 +0530
committerFahim2016-02-05 11:33:44 +0530
commit378fc7dc1bbc4c8c1c84db4a049d12f3414c6584 (patch)
tree0de87e1273cf47bc9a9ca19ff38623e62090c7c8
parent50b33879a606e28d85e5f7df12194ee4820e87b9 (diff)
downloadnghdl-378fc7dc1bbc4c8c1c84db4a049d12f3414c6584.tar.gz
nghdl-378fc7dc1bbc4c8c1c84db4a049d12f3414c6584.tar.bz2
nghdl-378fc7dc1bbc4c8c1c84db4a049d12f3414c6584.zip
Modified Appconfig.py to separate nghdl & esim config detail
-rw-r--r--src/Appconfig.py12
-rw-r--r--src/createKicadLibrary.py2
2 files changed, 9 insertions, 5 deletions
diff --git a/src/Appconfig.py b/src/Appconfig.py
index 2d610c1..55e6e79 100644
--- a/src/Appconfig.py
+++ b/src/Appconfig.py
@@ -5,13 +5,17 @@ from ConfigParser import SafeConfigParser
class Appconfig:
home = os.path.expanduser("~")
#Reading all varibale from eSim config.ini
- parser = SafeConfigParser()
- parser.read(os.path.join(home, os.path.join('.esim','config.ini')))
- src_home = parser.get('eSim','eSim_HOME')
- xml_loc = os.path.join(src_home,'src/modelParamXML')#"/opt/eSim/src/modelParamXML/"
+ parser_esim = SafeConfigParser()
+ parser_esim.read(os.path.join(home, os.path.join('.esim','config.ini')))
+ src_home = parser_esim.get('eSim','eSim_HOME')
+ xml_loc = os.path.join(src_home,'src/modelParamXML')
lib_loc = os.path.expanduser('~')
esimFlag = 0
+ #Reading all variable from nghdl config.ini
+ parser_nghdl = SafeConfigParser()
+ parser_nghdl.read(os.path.join(home,os.path.join('.nghdl','config.ini')))
+
kicad_lib_template = {
"start_def":"DEF comp_name U 0 40 Y Y 1 F N",
"U_field":"F0 \"U\" 2850 1800 60 H V C CNN",
diff --git a/src/createKicadLibrary.py b/src/createKicadLibrary.py
index a789709..ae3e11d 100644
--- a/src/createKicadLibrary.py
+++ b/src/createKicadLibrary.py
@@ -14,7 +14,7 @@ class AutoSchematic(QtGui.QWidget):
self.xml_loc = Appconfig.xml_loc
self.lib_loc = Appconfig.lib_loc
self.kicad_nghdl_lib = 'eSim_kicad.lib'
-
+ self.parser = Appconfig.parser_nghdl
def createKicadLibrary(self):
xmlFound = None