diff options
author | komalsheth236 | 2015-09-22 14:31:02 +0530 |
---|---|---|
committer | komalsheth236 | 2015-09-22 14:31:02 +0530 |
commit | 193d284f377ccf963bbd762bdb03f3daae2fa1af (patch) | |
tree | 185b7547e717b9053a82b829b30aa05894daff33 /src | |
parent | bcc0d1b98380f33b9d0c389f5322dc1e880af9e5 (diff) | |
download | eSim-193d284f377ccf963bbd762bdb03f3daae2fa1af.tar.gz eSim-193d284f377ccf963bbd762bdb03f3daae2fa1af.tar.bz2 eSim-193d284f377ccf963bbd762bdb03f3daae2fa1af.zip |
Nghdl Processes Terminated
Diffstat (limited to 'src')
-rw-r--r-- | src/configuration/Appconfig.py | 1 | ||||
-rwxr-xr-x | src/frontEnd/Application.py | 9 | ||||
-rw-r--r-- | src/kicadtoNgspice/DeviceModel.py | 6 | ||||
-rw-r--r-- | src/ngspiceSimulation/NgspiceWidget.py | 2 |
4 files changed, 15 insertions, 3 deletions
diff --git a/src/configuration/Appconfig.py b/src/configuration/Appconfig.py index 16e440ab..0d3e0346 100644 --- a/src/configuration/Appconfig.py +++ b/src/configuration/Appconfig.py @@ -44,6 +44,7 @@ class Appconfig(QtGui.QWidget): project_explorer = json.load(open(dictPath)) except: project_explorer= {} + process_obj = [] def __init__(self): super(Appconfig, self).__init__() diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index ce6dfff7..c72422c1 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -242,6 +242,15 @@ class Application(QtGui.QMainWindow): proc.terminate() except: pass + + try : + for process_object in self.obj_appconfig.process_obj: + try: + process_object.close() + except: + pass + except: + pass ##Just checking if open and New window is open. If yes just close it when application is closed try: self.project.close() diff --git a/src/kicadtoNgspice/DeviceModel.py b/src/kicadtoNgspice/DeviceModel.py index 90443d31..aaf02f45 100644 --- a/src/kicadtoNgspice/DeviceModel.py +++ b/src/kicadtoNgspice/DeviceModel.py @@ -65,7 +65,7 @@ class DeviceModel(QtGui.QWidget): transbox.setTitle("Add library for Transistor "+words[0]+" : "+words[4]) self.entry_var[self.count] = QtGui.QLineEdit() self.entry_var[self.count].setText("") - #global path_name + global path_name try: for child in root: if child.tag[0]==eachline[0] and child.tag[1]==eachline[1]: @@ -116,7 +116,7 @@ class DeviceModel(QtGui.QWidget): diodebox.setTitle("Add library for Diode "+words[0]+" : "+words[3]) self.entry_var[self.count] = QtGui.QLineEdit() self.entry_var[self.count].setText("") - global path_name + #global path_name try: for child in root: if child.tag[0]==eachline[0] and child.tag[1]==eachline[1]: @@ -167,7 +167,7 @@ class DeviceModel(QtGui.QWidget): jfetbox.setTitle("Add library for JFET "+words[0]+" : "+words[4]) self.entry_var[self.count] = QtGui.QLineEdit() self.entry_var[self.count].setText("") - global path_name + #global path_name try: for child in root: if child.tag[0]==eachline[0] and child.tag[1]==eachline[1]: diff --git a/src/ngspiceSimulation/NgspiceWidget.py b/src/ngspiceSimulation/NgspiceWidget.py index f2ad973f..4a8c2aba 100644 --- a/src/ngspiceSimulation/NgspiceWidget.py +++ b/src/ngspiceSimulation/NgspiceWidget.py @@ -15,11 +15,13 @@ class NgspiceWidget(QtGui.QWidget): 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) + self.obj_appconfig.process_obj.append(self.process) elif platform.system() == 'Windows': tempdir= os.getcwd() |