summaryrefslogtreecommitdiff
path: root/src/Appconfig.py
diff options
context:
space:
mode:
authorrahulp132020-02-10 23:36:00 +0530
committerrahulp132020-02-10 23:36:00 +0530
commit28bdf8d26cc422e27a52f33155555db877d07c6e (patch)
tree3dfd131338413d3d87e56c75b6bf47081da2da52 /src/Appconfig.py
parentc5a685994fb5f19c52f3f22ffad7ede82a1d393c (diff)
downloadnghdl-28bdf8d26cc422e27a52f33155555db877d07c6e.tar.gz
nghdl-28bdf8d26cc422e27a52f33155555db877d07c6e.tar.bz2
nghdl-28bdf8d26cc422e27a52f33155555db877d07c6e.zip
ported to py3
Diffstat (limited to 'src/Appconfig.py')
-rw-r--r--src/Appconfig.py39
1 files changed, 19 insertions, 20 deletions
diff --git a/src/Appconfig.py b/src/Appconfig.py
index 6909c53..8ad0a77 100644
--- a/src/Appconfig.py
+++ b/src/Appconfig.py
@@ -1,35 +1,34 @@
import os.path
-from ConfigParser import SafeConfigParser
+from configparser import SafeConfigParser
class Appconfig:
home = os.path.expanduser("~")
- #Reading all varibale from eSim config.ini
+ # Reading all variables from eSim config.ini
parser_esim = SafeConfigParser()
- parser_esim.read(os.path.join(home, os.path.join('.esim','config.ini')))
+ parser_esim.read(os.path.join(home, os.path.join('.esim', 'config.ini')))
try:
- src_home = parser_esim.get('eSim','eSim_HOME')
- xml_loc = os.path.join(src_home,'src/modelParamXML')
+ src_home = parser_esim.get('eSim', 'eSim_HOME')
+ xml_loc = os.path.join(src_home, 'src/modelParamXML')
lib_loc = os.path.expanduser('~')
- except:
+ except BaseException:
pass
esimFlag = 0
- #Reading all variable from nghdl config.ini
+ # Reading all variables from nghdl config.ini
parser_nghdl = SafeConfigParser()
- parser_nghdl.read(os.path.join(home,os.path.join('.nghdl','config.ini')))
+ 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",
- "comp_name_field":"F1 \"comp_name\" 2850 2000 60 H V C CNN",
- "blank_field":["F2 blank_quotes 2850 1950 60 H V C CNN","F3 blank_quotes 2850 1950 60 H V C CNN"],
- "start_draw":"DRAW",
- "draw_pos":"S 2550 2100 3150 1800 0 1 0 N",
- "input_port":"X in 1 2350 2000 200 R 50 50 1 1 I",
- "output_port":"X out 2 3350 2000 200 L 50 50 1 1 O",
- "end_draw":"ENDDRAW",
- "end_def":"ENDDEF"
+ "start_def": "DEF comp_name U 0 40 Y Y 1 F N",
+ "U_field": "F0 \"U\" 2850 1800 60 H V C CNN",
+ "comp_name_field": "F1 \"comp_name\" 2850 2000 60 H V C CNN",
+ "blank_field": ["F2 blank_quotes 2850 1950 60 H V C CNN",
+ "F3 blank_quotes 2850 1950 60 H V C CNN"],
+ "start_draw": "DRAW",
+ "draw_pos": "S 2550 2100 3150 1800 0 1 0 N",
+ "input_port": "X in 1 2350 2000 200 R 50 50 1 1 I",
+ "output_port": "X out 2 3350 2000 200 L 50 50 1 1 O",
+ "end_draw": "ENDDRAW",
+ "end_def": "ENDDEF"
}
-
-