diff options
author | komalsheth236 | 2015-06-18 16:11:06 +0530 |
---|---|---|
committer | komalsheth236 | 2015-06-18 16:11:06 +0530 |
commit | 9f13750ffc4946177d7e22bed8b19e62ee76e502 (patch) | |
tree | f58df8c30dcc478dff4672884ec10a4b61056da2 /src/ngspiceSimulation/NgspiceWidget.py | |
parent | 7dd5d060156177b0ee05c81c96c709767aca1989 (diff) | |
download | eSim-9f13750ffc4946177d7e22bed8b19e62ee76e502.tar.gz eSim-9f13750ffc4946177d7e22bed8b19e62ee76e502.tar.bz2 eSim-9f13750ffc4946177d7e22bed8b19e62ee76e502.zip |
Bug fixing for model editor and ngspicewidget for windows
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-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) + |