Example #1
0
 def help(self):
     folder = os.path.join( OTBUtils.otbDescriptionPath(), 'doc' )
     helpfile = os.path.join( str(folder), self.appkey + ".html")
     if os.path.exists(helpfile):
         return False, helpfile
     else:
         raise WrongHelpFileException("Could not find help file for this algorithm. \nIf you have it put it in: \n"+str(folder))
Example #2
0
 def help(self):
     folder = os.path.join(OTBUtils.otbDescriptionPath(), 'doc')
     helpfile = os.path.join(str(folder), self.appkey + ".html")
     if os.path.exists(helpfile):
         return False, helpfile
     else:
         raise False, None
Example #3
0
 def help(self):
     folder = os.path.join( OTBUtils.otbDescriptionPath(), 'doc' )
     helpfile = os.path.join( str(folder), self.appkey + ".html")
     if os.path.exists(helpfile):
         return False, helpfile
     else:
         raise (False, None)
Example #4
0
 def help(self):
     folder = os.path.join(OTBUtils.otbDescriptionPath(), 'doc')
     helpfile = os.path.join(str(folder), self.appkey + ".html")
     if os.path.exists(helpfile):
         return False, helpfile
     else:
         raise WrongHelpFileException(
             "Could not find help file for this algorithm. \nIf you have it put it in: \n"
             + str(folder))
Example #5
0
    def createAlgsList(self):
        self.preloadedAlgs = []
        folder = OTBUtils.otbDescriptionPath()
        for descriptionFile in os.listdir(folder):
            if descriptionFile.endswith("xml"):
                try:
                    alg = OTBAlgorithm(os.path.join(folder, descriptionFile))

                    if alg.name.strip() != "":
                        self.preloadedAlgs.append(alg)
                    else:
                        ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not open OTB algorithm: " + descriptionFile)
                except Exception,e:
                    ProcessingLog.addToLog(ProcessingLog.LOG_ERROR, "Could not open OTB algorithm: " + descriptionFile)
Example #6
0
    def createAlgsList(self):
        self.preloadedAlgs = []
        folder = OTBUtils.otbDescriptionPath()
        for descriptionFile in os.listdir(folder):
            if descriptionFile.endswith("xml"):
                try:
                    alg = OTBAlgorithm(os.path.join(folder, descriptionFile))

                    if alg.name.strip() != "":
                        self.preloadedAlgs.append(alg)
                    else:
                        ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
                                               self.tr("Could not open OTB algorithm: %s" % descriptionFile))
                except Exception as e:
                    ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
                                           self.tr("Could not open OTB algorithm: %s" % descriptionFile))