From 30c607ef581345958f0f9bdb5dd5603a1dd774c8 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Sun, 31 Mar 2019 04:28:27 +0530 Subject: port to python3 --- src/subcircuit/convertSub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/subcircuit/convertSub.py') diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py index 358028ed..ca1d1a4f 100644 --- a/src/subcircuit/convertSub.py +++ b/src/subcircuit/convertSub.py @@ -18,7 +18,7 @@ class convertSub(QtGui.QWidget): """ This function create command to call kicad to Ngspice converter. """ - print "Openinig Kicad-to-Ngspice converter from Subcircuit Module" + print("Openinig Kicad-to-Ngspice converter from Subcircuit Module") self.projDir = self.obj_appconfig.current_subcircuit["SubcircuitName"] #Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): -- cgit From 28d8fd378bf717e8daba8a564708856769f24b98 Mon Sep 17 00:00:00 2001 From: maddy-2 Date: Mon, 27 May 2019 12:32:49 +0530 Subject: initialise pep8 compliance, using autopep8 --- src/subcircuit/convertSub.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) (limited to 'src/subcircuit/convertSub.py') diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py index ca1d1a4f..23e6d52b 100644 --- a/src/subcircuit/convertSub.py +++ b/src/subcircuit/convertSub.py @@ -3,39 +3,42 @@ from projManagement.Validation import Validation from configuration.Appconfig import Appconfig import os + class convertSub(QtGui.QWidget): """ This class is called when User create new Project. """ - - def __init__(self,dockarea): + + def __init__(self, dockarea): super(convertSub, self).__init__() self.obj_validation = Validation() - self.obj_appconfig=Appconfig() - self.obj_dockarea=dockarea - + self.obj_appconfig = Appconfig() + self.obj_dockarea = dockarea + def createSub(self): """ This function create command to call kicad to Ngspice converter. """ print("Openinig Kicad-to-Ngspice converter from Subcircuit Module") self.projDir = self.obj_appconfig.current_subcircuit["SubcircuitName"] - #Validating if current project is available or not + # Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): - #Checking if project has .cir file or not + # Checking if project has .cir file or not if self.obj_validation.validateCir(self.projDir): #print "CIR file present" self.projName = os.path.basename(self.projDir) - self.project = os.path.join(self.projDir,self.projName) - - var1=self.project+".cir" - var2="sub" - self.obj_dockarea.kicadToNgspiceEditor(var1,var2) + self.project = os.path.join(self.projDir, self.projName) + + var1 = self.project + ".cir" + var2 = "sub" + self.obj_dockarea.kicadToNgspiceEditor(var1, var2) else: self.msg = QtGui.QErrorMessage(None) - self.msg.showMessage('The subcircuit does not contain any Kicad netlist file for conversion.') - self.msg.setWindowTitle("Error Message") + self.msg.showMessage( + 'The subcircuit does not contain any Kicad netlist file for conversion.') + self.msg.setWindowTitle("Error Message") else: self.msg = QtGui.QErrorMessage(None) - self.msg.showMessage('Please select the subcircuit first. You can either create new subcircuit or open existing subcircuit') - self.msg.setWindowTitle("Error Message") \ No newline at end of file + self.msg.showMessage( + 'Please select the subcircuit first. You can either create new subcircuit or open existing subcircuit') + self.msg.setWindowTitle("Error Message") -- cgit From 818c3f2d43914940ba3cdf580c5a6f26a8200834 Mon Sep 17 00:00:00 2001 From: nilshah98 Date: Tue, 28 May 2019 00:27:24 +0530 Subject: projectManagement, ngspicetoModelica, subcircuit made pep8 compliant --- src/subcircuit/convertSub.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/subcircuit/convertSub.py') diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py index 23e6d52b..31ae3022 100644 --- a/src/subcircuit/convertSub.py +++ b/src/subcircuit/convertSub.py @@ -25,7 +25,7 @@ class convertSub(QtGui.QWidget): if self.obj_validation.validateKicad(self.projDir): # Checking if project has .cir file or not if self.obj_validation.validateCir(self.projDir): - #print "CIR file present" + # print "CIR file present" self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir, self.projName) @@ -35,10 +35,12 @@ class convertSub(QtGui.QWidget): else: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage( - 'The subcircuit does not contain any Kicad netlist file for conversion.') + 'The subcircuit does not contain any Kicad netlist\ + file for conversion.') self.msg.setWindowTitle("Error Message") else: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage( - 'Please select the subcircuit first. You can either create new subcircuit or open existing subcircuit') + 'Please select the subcircuit first. You can either create \ + new subcircuit or open existing subcircuit') self.msg.setWindowTitle("Error Message") -- cgit