diff options
author | nilshah98 | 2019-06-07 19:15:54 +0530 |
---|---|---|
committer | nilshah98 | 2019-06-13 12:18:39 +0530 |
commit | 89c637c341a281d31ccd63be65a3504d6db79882 (patch) | |
tree | e46a0272c89123fa0ee01ceb375dcc0f5440472b /src/kicadtoNgspice | |
parent | daffbbb29757deff785c13a429b4c03fe3f25fba (diff) | |
download | eSim-89c637c341a281d31ccd63be65a3504d6db79882.tar.gz eSim-89c637c341a281d31ccd63be65a3504d6db79882.tar.bz2 eSim-89c637c341a281d31ccd63be65a3504d6db79882.zip |
made pep8 compliant using autopep8 tool
Diffstat (limited to 'src/kicadtoNgspice')
-rw-r--r-- | src/kicadtoNgspice/KicadtoNgspice.py | 3 | ||||
-rw-r--r-- | src/kicadtoNgspice/Model.py | 4 | ||||
-rw-r--r-- | src/kicadtoNgspice/Processing.py | 6 | ||||
-rw-r--r-- | src/kicadtoNgspice/SubcircuitTab.py | 2 |
4 files changed, 10 insertions, 5 deletions
diff --git a/src/kicadtoNgspice/KicadtoNgspice.py b/src/kicadtoNgspice/KicadtoNgspice.py index 9624fc82..19f3ffe2 100644 --- a/src/kicadtoNgspice/KicadtoNgspice.py +++ b/src/kicadtoNgspice/KicadtoNgspice.py @@ -41,6 +41,7 @@ class MainWindow(QtGui.QWidget): - clarg1 is the path to the .cir file - clarg2 is either None or "sub" depending on the analysis type """ + def __init__(self, clarg1, clarg2=None): QtGui.QWidget.__init__(self) print("==================================") @@ -107,7 +108,7 @@ class MainWindow(QtGui.QWidget): unknownModelList, multipleModelList, plotText - ) = obj_proc.convertICintoBasicBlocks( + ) = obj_proc.convertICintoBasicBlocks( schematicInfo, outputOption, modelList, plotText ) print("=======================================") diff --git a/src/kicadtoNgspice/Model.py b/src/kicadtoNgspice/Model.py index eb1793f9..6647feb7 100644 --- a/src/kicadtoNgspice/Model.py +++ b/src/kicadtoNgspice/Model.py @@ -115,8 +115,8 @@ class Model(QtGui.QWidget): self.obj_trac.model_entry_var [self.nextcount].setText( str(list(json_data - ["model"][mod]["values"] - [i].values())[0])) + ["model"][mod]["values"] + [i].values())[0])) ) i = i + 1 except BaseException: diff --git a/src/kicadtoNgspice/Processing.py b/src/kicadtoNgspice/Processing.py index ebbd3429..216383e6 100644 --- a/src/kicadtoNgspice/Processing.py +++ b/src/kicadtoNgspice/Processing.py @@ -16,6 +16,7 @@ class PrcocessNetlist: """ - Read the circuit file and return splitted lines """ + def readNetlist(self, filename): f = open(filename) data = f.read() @@ -31,6 +32,7 @@ class PrcocessNetlist: - Read Parameter information and store it into dictionary - kicadNetlis is the .cir file content """ + def readParamInfo(self, kicadNetlis): param = {} print("=========================KICADNETLIST========================") @@ -55,6 +57,7 @@ class PrcocessNetlist: - Preprocess netlist (replace parameters) - Separate infoline (first line) from the rest of netlist """ + def preprocessNetlist(self, kicadNetlis, param): netlist = [] for eachline in kicadNetlis: @@ -125,6 +128,7 @@ class PrcocessNetlist: - Then check for type whether ac, dc, sine, etc... - Handle starting with h and f as well """ + def insertSpecialSourceParam(self, schematicInfo, sourcelist): schematicInfo1 = [] print("=============================================================") @@ -462,7 +466,7 @@ class PrcocessNetlist: "a" + str(k) + " (" + words[1] + " " + words[2] + ") (interNode_" + str(interMediateNodeCount) + " " + words[3] + ") " - ) + ) modelLine += compName + "_primary" schematicInfo.append(modelLine) k = k + 1 diff --git a/src/kicadtoNgspice/SubcircuitTab.py b/src/kicadtoNgspice/SubcircuitTab.py index 7b8001b1..53a8eac9 100644 --- a/src/kicadtoNgspice/SubcircuitTab.py +++ b/src/kicadtoNgspice/SubcircuitTab.py @@ -203,4 +203,4 @@ class SubcircuitTab(QtGui.QWidget): "Please select a valid Subcircuit directory \ (Containing '.sub' file).") self.msg.setWindowTitle("Error Message") - self.msg.show()
\ No newline at end of file + self.msg.show() |