diff options
author | fahim | 2015-05-18 14:43:03 +0530 |
---|---|---|
committer | fahim | 2015-05-18 14:43:03 +0530 |
commit | 07e43f9abbf5e369543f090ccf89f565038241cb (patch) | |
tree | 9a9bded5624631de23e74912bf68f4f6ac53c573 /src | |
parent | a341c872157b497306e964c4407b012774cc0597 (diff) | |
download | eSim-07e43f9abbf5e369543f090ccf89f565038241cb.tar.gz eSim-07e43f9abbf5e369543f090ccf89f565038241cb.tar.bz2 eSim-07e43f9abbf5e369543f090ccf89f565038241cb.zip |
Subject: Make changes in openNgSpice function
Description:Make changes in openNgSpice function
Diffstat (limited to 'src')
-rwxr-xr-x | src/frontEnd/Application.py | 5 | ||||
-rw-r--r-- | src/projManagement/Kicad.py | 25 | ||||
-rw-r--r-- | src/projManagement/Kicad.pyc | bin | 5337 -> 5551 bytes |
3 files changed, 20 insertions, 10 deletions
diff --git a/src/frontEnd/Application.py b/src/frontEnd/Application.py index 7dee39a7..e15c71b1 100755 --- a/src/frontEnd/Application.py +++ b/src/frontEnd/Application.py @@ -134,7 +134,7 @@ class Application(QtGui.QMainWindow): directory, filelist =self.project.createProject(self.projname) self.obj_Mainview.obj_projectExplorer.addTreeNode(directory, filelist) - #self.setCentralWidget(self.obj_Mainview.obj_projectExplorer) + else: print "No project created" @@ -163,7 +163,8 @@ class Application(QtGui.QMainWindow): self.obj_Mainview.obj_dockarea.plottingEditor() else: - print "Return False" + print "Unable to open NgSpice" + def exit_project(self): diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index aa4ba8eb..a1873555 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -148,19 +148,28 @@ class Kicad: self.cmd = "xterm -e ngspice "+self.project+".cir.out" proc = subprocess.Popen(self.cmd.split()) - proc.communicate()[0] + self.obj_appconfig.procThread_list.append(proc) - #Moving plot_data_i.txt and plot_data_v.txt to project directory - shutil.copy2("plot_data_i.txt", self.projDir) - shutil.copy2("plot_data_v.txt", self.projDir) - #Deleting this file from current directory - os.remove("plot_data_i.txt") - os.remove("plot_data_v.txt") + sleep(2) #Need permanent solution + try: + #Moving plot_data_i.txt and plot_data_v.txt to project directory + shutil.copy2("plot_data_i.txt", self.projDir) + shutil.copy2("plot_data_v.txt", self.projDir) + #Deleting this file from current directory + os.remove("plot_data_i.txt") + os.remove("plot_data_v.txt") + except Exception as e: + self.msg = QtGui.QErrorMessage(None) + self.msg.showMessage('Unable to copy plot data file to project directory.') + print "Exception:",str(e) + self.msg.setWindowTitle("Error Message") + return False + return True else: self.msg = QtGui.QErrorMessage(None) self.msg.showMessage('Please select the project first. You can either create new project or open existing project') self.msg.setWindowTitle("Error Message") - return False
\ No newline at end of file + #return False
\ No newline at end of file diff --git a/src/projManagement/Kicad.pyc b/src/projManagement/Kicad.pyc Binary files differindex f805c100..bf6ccb75 100644 --- a/src/projManagement/Kicad.pyc +++ b/src/projManagement/Kicad.pyc |