summaryrefslogtreecommitdiff
path: root/src/kicadtoNgspice/Model.py
diff options
context:
space:
mode:
authornilshah982019-03-31 04:28:27 +0530
committernilshah982019-03-31 04:28:27 +0530
commit30c607ef581345958f0f9bdb5dd5603a1dd774c8 (patch)
tree106bc0624d2f0900a57e99cc125ac5df6e01db20 /src/kicadtoNgspice/Model.py
parent8b986efb1c9216e284f6cc27a8f44d09e5c5cc59 (diff)
downloadeSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.tar.gz
eSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.tar.bz2
eSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.zip
port to python3
Diffstat (limited to 'src/kicadtoNgspice/Model.py')
-rw-r--r--src/kicadtoNgspice/Model.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py
index 11d65c03..3f83b0d0 100644
--- a/src/kicadtoNgspice/Model.py
+++ b/src/kicadtoNgspice/Model.py
@@ -1,6 +1,6 @@
from PyQt4 import QtGui
import json
-import TrackWidget
+from . import TrackWidget
#from xml.etree import ElementTree as ET
import os
@@ -25,7 +25,7 @@ class Model(QtGui.QWidget):
data = f.read()
json_data = json.loads(data)
except:
- print "Model Previous Values JSON is Empty"
+ print("Model Previous Values JSON is Empty")
@@ -55,7 +55,7 @@ class Model(QtGui.QWidget):
self.start = self.nextcount
#line[7] is parameter dictionary holding parameter tags.
i = 0
- for key,value in line[7].iteritems():
+ for key,value in line[7].items():
#print "Key : ",key
#print "Value : ",value
#Check if value is iterable
@@ -71,7 +71,7 @@ class Model(QtGui.QWidget):
try:
for mod in json_data["model"]:
if json_data["model"][mod]["type"] == line[2] and mod == line[3]:
- self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][mod]["values"][i].values()[0]))
+ self.obj_trac.model_entry_var[self.nextcount].setText(str(list(json_data["model"][mod]["values"][i].values())[0]))
i = i + 1
except:
pass
@@ -90,7 +90,7 @@ class Model(QtGui.QWidget):
try:
for mod in json_data["model"]:
if json_data["model"][mod]["type"] == line[2] and mod == line[3]:
- self.obj_trac.model_entry_var[self.nextcount].setText(str(json_data["model"][mod]["values"][i].values()[0]))
+ self.obj_trac.model_entry_var[self.nextcount].setText(str(list(json_data["model"][mod]["values"][i].values())[0]))
i = i + 1
except:
pass