summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Model.py
diff options
context:
space:
mode:
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