From 968b8a727cc4c4f2249f5f9bd47af015286deb28 Mon Sep 17 00:00:00 2001 From: fahim Date: Tue, 16 Jun 2015 17:06:07 +0530 Subject: Subject: Changes in NgspiceWidget.py for Windows platform Description: Changes in NgspiceWidget.py for Windows platform --- src/ngspiceSimulation/NgspiceWidget.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/ngspiceSimulation/NgspiceWidget.py') diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index 21b5164d..b4202720 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -1,5 +1,6 @@ from PyQt4 import QtGui,QtCore from configuration.Appconfig import Appconfig +import platform class NgspiceWidget(QtGui.QWidget): """ @@ -8,19 +9,19 @@ class NgspiceWidget(QtGui.QWidget): def __init__(self,command,projPath): QtGui.QWidget.__init__(self) self.obj_appconfig = Appconfig() - self.command = "cd "+projPath+";ngspice "+command self.process = QtCore.QProcess(self) self.terminal = QtGui.QWidget(self) self.layout = QtGui.QVBoxLayout(self) self.layout.addWidget(self.terminal) - - #Creating argument for process - self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command] - self.process.start('xterm', self.args) - - - - - - + print"command-------->", command + if platform.system() == 'Linux': + self.command = "cd "+projPath+";ngspice "+command + #Creating argument for process + self.args = ['-into', str(self.terminal.winId()),'-hold','-e', self.command] + self.process.start('xterm', self.args) + + elif platform.system() == 'Windows': + self.command = "ngspice "+command + self.process.start(self.command) + -- cgit