summaryrefslogtreecommitdiff
path: root/src/pspicetoKicad/ImportPspice.py
diff options
context:
space:
mode:
authorFahim2015-10-15 16:32:59 +0530
committerFahim2015-10-15 16:32:59 +0530
commit770e2898eb880a1eb721274b5d8d9633dc757064 (patch)
treec9b76122d37d44ea7568bb9f6de3b3be584a4730 /src/pspicetoKicad/ImportPspice.py
parent5fcc64653e76166b5385086d9fbd2e7974845760 (diff)
downloadeSim-770e2898eb880a1eb721274b5d8d9633dc757064.tar.gz
eSim-770e2898eb880a1eb721274b5d8d9633dc757064.tar.bz2
eSim-770e2898eb880a1eb721274b5d8d9633dc757064.zip
Fix Pspice library converter calling
Diffstat (limited to 'src/pspicetoKicad/ImportPspice.py')
-rw-r--r--src/pspicetoKicad/ImportPspice.py30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/pspicetoKicad/ImportPspice.py b/src/pspicetoKicad/ImportPspice.py
index 3134601d..db485aad 100644
--- a/src/pspicetoKicad/ImportPspice.py
+++ b/src/pspicetoKicad/ImportPspice.py
@@ -17,9 +17,35 @@ class ImportPspiceLibrary(QtGui.QWidget):
self.obj_Appconfig.print_info('File selected : '+self.libLocation)
#Create command to run
- self.cmd = "../pspicetoKicad/libConverter "+self.libLocation
- os.system(str(self.cmd))
+
+ if platform.system() == 'Linux':
+ #Check for 32 or 64 bit
+ if platform.architecture()[0] == '64bit':
+ self.cmd = "../pspicetoKicad/libConverter64 "+self.libLocation
+ else:
+ self.cmd = "../pspicetoKicad/libConverter32 "+self.libLocation
+
+ elif platform.system() == 'Windows':
+ print "Needs to include for Windows"
+
+ self.status = os.system(str(self.cmd))
+
+
+ if self.status == 0:
+ self.msg = QtGui.QMessageBox()
+ self.msgContent = "Successfully imported and converted PSPICE library to Kicad library.<br/>"
+ self.msg.setTextFormat(QtCore.Qt.RichText)
+ self.msg.setText(self.msgContent)
+ self.msg.setWindowTitle("Message")
+ self.obj_Appconfig.print_info(self.msgContent)
+ self.msg.exec_()
+
+ else:
+ self.msg = QtGui.QErrorMessage(None)
+ self.msg.showMessage('Error while converting PSPICE library to Kicad library')
+ self.obj_Appconfig.print_error('Error while converting PSPICE library to Kicad library')
+ self.msg.setWindowTitle("Error Message")
class ConvertPspiceKicad(QtGui.QWidget):