diff options
Diffstat (limited to 'src/ngspiceSimulation')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index b4202720..f2ad973f 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -1,6 +1,7 @@ from PyQt4 import QtGui,QtCore from configuration.Appconfig import Appconfig -import platform
+import platform +import os class NgspiceWidget(QtGui.QWidget): """ @@ -13,15 +14,19 @@ class NgspiceWidget(QtGui.QWidget): self.terminal = QtGui.QWidget(self) self.layout = QtGui.QVBoxLayout(self) self.layout.addWidget(self.terminal) - 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)
-
+ 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': + tempdir= os.getcwd() + projPath = self.obj_appconfig.current_project["ProjectName"] + os.chdir(projPath) + self.command = "ngspice "+command + self.process.start(self.command) + os.chdir(tempdir) + |