summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Model.py
diff options
context:
space:
mode:
authornilshah982019-06-07 18:54:35 +0530
committernilshah982019-06-13 12:15:50 +0530
commita0f738ba15264b69d9d51755569408bdd8e383b5 (patch)
tree3d472af32b57508a16dd7f81e5c54f8ccda1bf47 /src/kicadtoNgspice/Model.py
parentcc9bb8d5d56e64b6e6b6ff2db988ff200b9f720d (diff)
downloadeSim-a0f738ba15264b69d9d51755569408bdd8e383b5.tar.gz
eSim-a0f738ba15264b69d9d51755569408bdd8e383b5.tar.bz2
eSim-a0f738ba15264b69d9d51755569408bdd8e383b5.zip
pep8 fixes and list models bug fixed
Diffstat (limited to 'src/kicadtoNgspice/Model.py')
-rw-r--r--src/kicadtoNgspice/Model.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py
index e9b5822a..9af7cbfb 100644
--- a/src/kicadtoNgspice/Model.py
+++ b/src/kicadtoNgspice/Model.py
@@ -7,8 +7,8 @@ import os
class Model(QtGui.QWidget):
"""
- This class creates Model Tab of KicadtoNgspice window.
- The widgets are created dynamically in the Model Tab.
+ - This class creates Model Tab of KicadtoNgspice window.
+ The widgets are created dynamically in the Model Tab.
"""
def __init__(self, schematicInfo, modelList, clarg1):
@@ -62,7 +62,7 @@ class Model(QtGui.QWidget):
# print "Key : ",key
# print "Value : ",value
# Check if value is iterable
- if hasattr(value, '__iter__'):
+ if hasattr(value, '__iter__') and type(value) is not str:
# For tag having vector value
temp_tag = []
for item in value:
@@ -78,7 +78,7 @@ class Model(QtGui.QWidget):
try:
for mod in json_data["model"]:
if json_data["model"][mod]["type"] ==\
- line[2] and mod == line[3]:
+ line[2] and mod == line[3]:
self.obj_trac.model_entry_var
[self.nextcount].setText(
str(list(
@@ -96,17 +96,18 @@ class Model(QtGui.QWidget):
else:
paramLabel = QtGui.QLabel(value)
modelgrid.addWidget(paramLabel, self.nextrow, 0)
- self.obj_trac.model_entry_var
- [self.nextcount] = QtGui.QLineEdit(
+ self.obj_trac.model_entry_var[self.nextcount] = (
+ QtGui.QLineEdit()
)
modelgrid.addWidget(
- self.obj_trac.model_entry_var
- [self.nextcount], self.nextrow, 1)
+ self.obj_trac.model_entry_var[self.nextcount],
+ self.nextrow, 1
+ )
try:
for mod in json_data["model"]:
if json_data["model"][mod]["type"] ==\
- line[2] and mod == line[3]:
+ line[2] and mod == line[3]:
self.obj_trac.model_entry_var
[self.nextcount].setText(
str(list(json_data