Exemplo n.º 1
0
 def run(self):
     if self.checkParam('-u'):
         prog.createProgramsDb()
         prog.createProgramsAutocomplete()
     elif self.type == 'labels':
         labels = prog.getXmippLabels()
         if self.checkParam("-i"):
             labels = [l for l in labels if self.hasKeywords(l)]
         # Check which labels are ported to python
         xm = __import__('xmipp') # load xmipp module object
         
         for l in labels:
             try:
                 getattr(xm, l['enum'])
             except Exception, ex:
                 l['comment'] = l['enum'] + ' (MISSING IN PYTHON BINDING)'
             print '{name:<30} {type:<30} {enum:<30} {comment}'.format(**l)
Exemplo n.º 2
0
    def run(self):
        if self.checkParam('-u'):
            prog.createProgramsDb()
            prog.createProgramsAutocomplete()
        elif self.type == 'labels':
            labels = prog.getXmippLabels()
            if self.checkParam("-i"):
                labels = [l for l in labels if self.hasKeywords(l)]
            # Check which labels are ported to python
            xm = __import__('xmipp')  # load xmipp module object

            for l in labels:
                try:
                    getattr(xm, l['enum'])
                except Exception, ex:
                    l['comment'] = l['enum'] + ' (MISSING IN PYTHON BINDING)'
                print '{name:<30} {type:<30} {enum:<30} {comment}'.format(**l)
Exemplo n.º 3
0
            labels = prog.getXmippLabels()
            if self.checkParam("-i"):
                labels = [l for l in labels if self.hasKeywords(l)]
            # Check which labels are ported to python
            xm = __import__('xmipp')  # load xmipp module object

            for l in labels:
                try:
                    getattr(xm, l['enum'])
                except Exception, ex:
                    l['comment'] = l['enum'] + ' (MISSING IN PYTHON BINDING)'
                print '{name:<30} {type:<30} {enum:<30} {comment}'.format(**l)
        else:
            dbName = prog.getProgramsDbName()
            if not os.path.exists(dbName):
                db = prog.createProgramsDb(dbName)
            else:
                db = prog.ProgramDb(dbName)

            onlyList = self.checkParam('--list')

            if onlyList and self.type != 'programs':
                categories = db.selectCategories()
                doBoth = self.type == 'both'
                for c in categories:
                    print pwutils.blue(c['name'])
                    if doBoth:
                        programs = db.selectPrograms(c)
                        #self.maxlen = 50
                        self.printPrograms(programs)
            else:
Exemplo n.º 4
0
            labels = prog.getXmippLabels()
            if self.checkParam("-i"):
                labels = [l for l in labels if self.hasKeywords(l)]
            # Check which labels are ported to python
            xm = __import__('xmipp') # load xmipp module object
            
            for l in labels:
                try:
                    getattr(xm, l['enum'])
                except Exception, ex:
                    l['comment'] = l['enum'] + ' (MISSING IN PYTHON BINDING)'
                print '{name:<30} {type:<30} {enum:<30} {comment}'.format(**l)
        else:
            dbName = prog.getProgramsDbName()
            if not os.path.exists(dbName):
                db = prog.createProgramsDb(dbName)
            else:
                db = prog.ProgramDb(dbName)

            onlyList = self.checkParam('--list')
            
            if onlyList and self.type != 'programs':
                categories = db.selectCategories()
                doBoth = self.type == 'both'
                for c in categories:
                    print pwutils.blue(c['name'])
                    if doBoth:
                        programs = db.selectPrograms(c)
                        #self.maxlen = 50
                        self.printPrograms(programs)
            else: