def make_all_dds(config, which, outdir): if not os.path.exists(outdir): os.makedirs(outdir) for id_symdds in which: if not id_symdds in config.symdds: raise_x_not_found('symdds', id_symdds, config.symdds) for id_symdds in which: make_dds(config, id_symdds, outdir)
def index_from_label(self, label): """ Get the index of the action with a given label. """ for i, a in enumerate(self.actions): if a.label == label: return i raise_x_not_found('label', label, [a.label for a in self.actions])