summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSunil Shetye2019-06-24 16:13:18 +0530
committerGitHub2019-06-24 16:13:18 +0530
commitca314c04845c832aa6ab7585510e29e6c3ca9221 (patch)
treec4b7b6d880ae79cbc75bf53866ac965b940fde64 /src
parentc59e3bed0598fc7399339e20c4696253d4d3fbc8 (diff)
parent6729452e815c8f4733f36deba572ee054113ca2c (diff)
downloadeSim-ca314c04845c832aa6ab7585510e29e6c3ca9221.tar.gz
eSim-ca314c04845c832aa6ab7585510e29e6c3ca9221.tar.bz2
eSim-ca314c04845c832aa6ab7585510e29e6c3ca9221.zip
Merge pull request #96 from nilshah98/issue93
Resolves #93
Diffstat (limited to 'src')
-rwxr-xr-xsrc/frontEnd/Application.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py
index 66fc2b91..97f895ad 100755
--- a/src/frontEnd/Application.py
+++ b/src/frontEnd/Application.py
@@ -31,8 +31,9 @@ from PyQt4.Qt import QSize
import sys
import os
-
# Its our main window of application.
+
+
class Application(QtGui.QMainWindow):
"""This class initializes all objects used in this file(Application.py)."""
global project_name
@@ -325,9 +326,24 @@ class Application(QtGui.QMainWindow):
if self.projDir is not None:
self.obj_Mainview.obj_dockarea.ngspiceEditor(self.projDir)
- time.sleep(2) # Need permanent solution
- # Calling Python Plotting
+ currTime = time.time()
+ count = 0
+ while True:
+ try:
+ st = os.stat(os.path.join(self.projDir, "plot_data_i.txt"))
+ if st.st_mtime >= currTime:
+ break
+ except Exception:
+ pass
+ time.sleep(0.2)
+
+ # Fail Safe ===>
+ count += 1
+ if count >= 100:
+ raise Exception("ngspice taking too long, check netlist file")
+
+ # Calling Python Plotting
try:
self.obj_Mainview.obj_dockarea.plottingEditor()
except Exception as e: