summaryrefslogtreecommitdiff
path: root/src/ngspiceSimulation/NgspiceWidget.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r--src/ngspiceSimulation/NgspiceWidget.py23
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)
+