summaryrefslogtreecommitdiff
path: root/src/subcircuit/convertSub.py
diff options
context:
space:
mode:
authorSunil Shetye2019-06-11 16:00:13 +0530
committerGitHub2019-06-11 16:00:13 +0530
commit19e57ec09fc6ddb8e1462ebc118841207497109b (patch)
tree85cc00b16004b7c64dc76ebdf4cc84d6b1a84499 /src/subcircuit/convertSub.py
parent8b986efb1c9216e284f6cc27a8f44d09e5c5cc59 (diff)
parent9e92a335fc364d391e9b524c226602a1677c2518 (diff)
downloadeSim-19e57ec09fc6ddb8e1462ebc118841207497109b.tar.gz
eSim-19e57ec09fc6ddb8e1462ebc118841207497109b.tar.bz2
eSim-19e57ec09fc6ddb8e1462ebc118841207497109b.zip
Merge pull request #85 from nilshah98/pep8
Made pep8 compliant
Diffstat (limited to 'src/subcircuit/convertSub.py')
-rw-r--r--src/subcircuit/convertSub.py41
1 files changed, 23 insertions, 18 deletions
diff --git a/src/subcircuit/convertSub.py b/src/subcircuit/convertSub.py
index 358028ed..31ae3022 100644
--- a/src/subcircuit/convertSub.py
+++ b/src/subcircuit/convertSub.py
@@ -3,39 +3,44 @@ 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"
+ 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"
+ # 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")