diff options
Diffstat (limited to 'src/projManagement')
-rw-r--r-- | src/projManagement/Kicad.py | 6 | ||||
-rw-r--r-- | src/projManagement/Validation.py | 17 | ||||
-rw-r--r-- | src/projManagement/Worker.py | 7 | ||||
-rw-r--r-- | src/projManagement/newProject.py | 3 | ||||
-rw-r--r-- | src/projManagement/openProject.py | 5 |
5 files changed, 15 insertions, 23 deletions
diff --git a/src/projManagement/Kicad.py b/src/projManagement/Kicad.py index 41fb8d79..ec3c69da 100644 --- a/src/projManagement/Kicad.py +++ b/src/projManagement/Kicad.py @@ -35,7 +35,7 @@ class Kicad: """ This function create command to open Kicad schematic """ - print "Kicad Schematic is called" + print "Function : Open Kicad Schematic" self.projDir = self.obj_appconfig.current_project["ProjectName"] try: self.obj_appconfig.print_info('Kicad Schematic is called for project ' + self.projDir) @@ -123,7 +123,7 @@ class Kicad: """ This function create command to call kicad to Ngspice converter. """ - print "Open Kicad to Ngspice Conversion" + print "Function: Open Kicad to Ngspice Converter" self.projDir = self.obj_appconfig.current_project["ProjectName"] try: @@ -133,10 +133,8 @@ class Kicad: pass #Validating if current project is available or not if self.obj_validation.validateKicad(self.projDir): - #print "Project is present" #Cheking if project has .cir file or not if self.obj_validation.validateCir(self.projDir): - #print "CIR file present" self.projName = os.path.basename(self.projDir) self.project = os.path.join(self.projDir,self.projName) diff --git a/src/projManagement/Validation.py b/src/projManagement/Validation.py index bafcbe08..a582cab5 100644 --- a/src/projManagement/Validation.py +++ b/src/projManagement/Validation.py @@ -34,7 +34,7 @@ class Validation: """ This function validate Open Project Information. """ - print "Validating Open Project Information" + print "Function: Validating Open Project Information" projName = os.path.basename(str(projDir)) lookProj = os.path.join(str(projDir),projName+".proj") #Check existence of project @@ -46,12 +46,12 @@ class Validation: def validateNewproj(self,projDir): - """This Project Validate New Project Information """ - print "Validating New Project Information" - #print "Project Directory : ",projDir + This Project Validate New Project Information + """ + print "Function: Validating New Project Information" + #Checking existence of project with same name - if os.path.exists(projDir): return "CHECKEXIST" #Project with name already exist else: @@ -65,7 +65,7 @@ class Validation: """ This function validate if Kicad components are present """ - print "Validation for Kicad components" + print "FUnction : Validating for Kicad components" if projDir == None: return False else: @@ -75,7 +75,6 @@ class Validation: """ This function checks if ".cir" file is present. """ - #print "Checking if .cir file is present or not" projName = os.path.basename(str(projDir)) lookCir = os.path.join(str(projDir),projName+".cir") #Check existence of project @@ -105,7 +104,9 @@ class Validation: #The number of ports is specified in this line #eg. '.subckt ua741 6 7 3' has 3 ports (6, 7 and 3). numPorts = len(words) - 2 - print "Looksub",lookSub,givenNum,numPorts + print "Looksub : ",lookSub + print "Given Number of ports : ",givenNum + print "Actual Number of ports :",numPorts if numPorts != givenNum: return "PORT" else: diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py index f7186913..9721f4a7 100644 --- a/src/projManagement/Worker.py +++ b/src/projManagement/Worker.py @@ -18,7 +18,6 @@ from PyQt4 import QtCore import subprocess from configuration.Appconfig import Appconfig -import os class WorkerThread(QtCore.QThread): """ @@ -31,11 +30,9 @@ class WorkerThread(QtCore.QThread): def __del__(self): self.wait() - - - + def run(self): - print "Calling Command:",self.args + print "Worker Thread Calling Command :",self.args self.call_system(self.args) def call_system(self,command): diff --git a/src/projManagement/newProject.py b/src/projManagement/newProject.py index 8e3c8656..5b4af49a 100644 --- a/src/projManagement/newProject.py +++ b/src/projManagement/newProject.py @@ -16,7 +16,7 @@ # CREATED: Wednesday 12 February 2015 # REVISION: --- #=============================================================================== -from PyQt4 import QtGui,QtCore +from PyQt4 import QtGui from Validation import Validation from configuration.Appconfig import Appconfig import os @@ -54,7 +54,6 @@ class NewProjectInfo(QtGui.QWidget): #Checking Validations Response if self.reply == "VALID": - print "Validated : Creating project directory" #create project directory try: os.mkdir(self.projDir) diff --git a/src/projManagement/openProject.py b/src/projManagement/openProject.py index c0733058..d980d914 100644 --- a/src/projManagement/openProject.py +++ b/src/projManagement/openProject.py @@ -35,11 +35,9 @@ class OpenProjectInfo(QtGui.QWidget): def body(self): self.obj_Appconfig = Appconfig() self.openDir = self.obj_Appconfig.default_workspace["workspace"] - #print "default workspace is now 1", self.openDir self.projDir=QtGui.QFileDialog.getExistingDirectory(self,"open",self.openDir) + if self.obj_validation.validateOpenproj(self.projDir) == True: - #print "Pass open project test" - #self.obj_Appconfig = Appconfig() self.obj_Appconfig.current_project['ProjectName'] = str(self.projDir) if os.path.isdir(self.projDir): print "true" @@ -54,7 +52,6 @@ class OpenProjectInfo(QtGui.QWidget): return dirs, filelist else: - #print "Failed open project test" self.obj_Appconfig.print_error("The project doesn't contain .proj file. Please select the proper directory else you won't be able to perform any operation") reply = QtGui.QMessageBox.critical(None, "Error Message",'''<b> Error: The project doesn't contain .proj file.</b><br/> <b>Please select the proper project directory else you won't be able to perform any operation</b>''',QtGui.QMessageBox.Ok|QtGui.QMessageBox.Cancel) |