diff options
author | nilshah98 | 2019-03-31 04:28:27 +0530 |
---|---|---|
committer | nilshah98 | 2019-03-31 04:28:27 +0530 |
commit | 30c607ef581345958f0f9bdb5dd5603a1dd774c8 (patch) | |
tree | 106bc0624d2f0900a57e99cc125ac5df6e01db20 /src/ngspiceSimulation/NgspiceWidget.py | |
parent | 8b986efb1c9216e284f6cc27a8f44d09e5c5cc59 (diff) | |
download | eSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.tar.gz eSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.tar.bz2 eSim-30c607ef581345958f0f9bdb5dd5603a1dd774c8.zip |
port to python3
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index 310cbe3c..b5645808 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -14,9 +14,9 @@ class NgspiceWidget(QtGui.QWidget): self.terminal = QtGui.QWidget(self) self.layout = QtGui.QVBoxLayout(self) self.layout.addWidget(self.terminal) - - print "Argument to ngspice command : ",command - + + print("Argument to ngspice command : ",command) + if platform.system() == 'Linux': self.command = "cd "+projPath+";ngspice "+command #Creating argument for process @@ -24,8 +24,8 @@ class NgspiceWidget(QtGui.QWidget): self.args = ['-hold','-e', self.command] self.process.start('xterm', self.args) self.obj_appconfig.process_obj.append(self.process) - self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']].append(self.process.pid()) - + self.obj_appconfig.proc_dict[self.obj_appconfig.current_project['ProjectName']].append(self.process.pid()) + elif platform.system() == 'Windows': tempdir= os.getcwd() projPath = self.obj_appconfig.current_project["ProjectName"] @@ -33,5 +33,3 @@ class NgspiceWidget(QtGui.QWidget): self.command = "ngspice "+command self.process.start(self.command) os.chdir(tempdir) - - |