diff options
author | Pranav P | 2023-06-01 12:42:10 +0530 |
---|---|---|
committer | Pranav P | 2023-06-01 12:45:38 +0530 |
commit | 9a01a2606665c521c1ee10fa94394127d5decbf3 (patch) | |
tree | bb77caa6f1b748470c088e348125d4f80a02157e /src/frontEnd/Application.py | |
parent | fd3852efb732b6434a5327a056135f3444b93ba3 (diff) | |
download | eSim-9a01a2606665c521c1ee10fa94394127d5decbf3.tar.gz eSim-9a01a2606665c521c1ee10fa94394127d5decbf3.tar.bz2 eSim-9a01a2606665c521c1ee10fa94394127d5decbf3.zip |
Changed style in accordance with flake8
Diffstat (limited to 'src/frontEnd/Application.py')
-rw-r--r-- | src/frontEnd/Application.py | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 8375e0e3..a78f7cd8 100644 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -550,12 +550,14 @@ class Application(QtWidgets.QMainWindow): psutil.AccessDenied, psutil.ZombieProcess): pass return False - + def checkChangeInPlotData(self, currTime, exitStatus): - """Checks whether there is a change in the analysis files(To see if simulation was successful) + """Checks whether there is a change in the analysis files. + (To see if simulation was successful) and displays the plotter where graphs can be plotted. - :param currTime: The time stamp of the analysis file before simulation starts + :param currTime: The time stamp of the analysis file + before simulation starts :type currTime: float :param exitStatus: The exit status of the ngspice QProcess :type exitStatus: class:`QtCore.QProcess.ExitStatus` @@ -578,15 +580,17 @@ class Application(QtWidgets.QMainWindow): ' Please look at console for more details.' ) self.msg.exec_() - print("Exception Message:", str(e), traceback.format_exc()) - self.obj_appconfig.print_error('Exception Message : ' + str(e)) - + print("Exception Message:", str(e), + traceback.format_exc()) + self.obj_appconfig.print_error('Exception Message : ' + + str(e)) + self.currTime = time.time() return except Exception: pass - + def toggleToolbarButtons(self, state): self.ngspice.setEnabled(state) self.conversion.setEnabled(state) @@ -601,14 +605,17 @@ class Application(QtWidgets.QMainWindow): "toggleToolbarButtons": self.toggleToolbarButtons, "checkChangeInPlotData": self.checkChangeInPlotData, } - + if self.projDir is not None: self.currTime = time.time() process = self.obj_Mainview.obj_dockarea.qprocess - process.started.connect(lambda: self.toggleToolbarButtons(state=False)) - process.finished.connect(lambda exitCode, exitStatus: self.checkChangeInPlotData(self.currTime, exitStatus)) + process.started.connect(lambda: + self.toggleToolbarButtons(state=False)) + process.finished.connect(lambda exitCode, exitStatus: + self.checkChangeInPlotData(self.currTime, + exitStatus)) # Edited by Sumanto Kar 25/08/2021 if self.obj_Mainview.obj_dockarea.ngspiceEditor( @@ -625,7 +632,7 @@ class Application(QtWidgets.QMainWindow): ) self.msg.exec_() return - + else: self.msg = QtWidgets.QErrorMessage() self.msg.setModal(True) |