diff options
author | fahim | 2015-06-16 17:06:07 +0530 |
---|---|---|
committer | fahim | 2015-06-16 17:06:07 +0530 |
commit | 968b8a727cc4c4f2249f5f9bd47af015286deb28 (patch) | |
tree | f826a87dcffad8dbcd4b6283768acd398087ff9a /src | |
parent | f211450817ba19e31a62fa9f8136eda2bb89f7c3 (diff) | |
download | eSim-968b8a727cc4c4f2249f5f9bd47af015286deb28.tar.gz eSim-968b8a727cc4c4f2249f5f9bd47af015286deb28.tar.bz2 eSim-968b8a727cc4c4f2249f5f9bd47af015286deb28.zip |
Subject: Changes in NgspiceWidget.py for Windows platform
Description: Changes in NgspiceWidget.py for Windows platform
Diffstat (limited to 'src')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 23 |
1 files changed, 12 insertions, 11 deletions
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)
+
|