diff options
Diffstat (limited to 'src/ngspiceSimulation/NgspiceWidget.py')
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index 52427681..def1d4e9 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -4,9 +4,11 @@ import platform import os +# This Class creates NgSpice Window class NgspiceWidget(QtGui.QWidget): """ - This Class creates NgSpice Window + Includes functions that checks whether OS is linux or windows + and creates NgSpice window accordingly. """ def __init__(self, command, projPath): @@ -18,21 +20,21 @@ class NgspiceWidget(QtGui.QWidget): self.layout.addWidget(self.terminal) print("Argument to ngspice command : ", command) - + # For Linux OS 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.args = ['-hold', '-e', self.command] self.process.start('xterm', self.args) self.obj_appconfig.process_obj.append(self.process) + print(self.obj_appconfig.proc_dict) ( self.obj_appconfig.proc_dict [self.obj_appconfig.current_project['ProjectName']].append( self.process.pid()) ) + # For Windows OS elif platform.system() == 'Windows': tempdir = os.getcwd() projPath = self.obj_appconfig.current_project["ProjectName"] |