PEATDB/Ekin/Base.py
def batchRename(self, pattern='', replacement=''):
        """Rename all datasets by replacing a pattern"""
        if pattern == replacement:
            return
        count=0
        for name in self.datasets[:]:
            newname = re.sub(pattern, replacement, name)
            if newname != name:
                self.renameDataset(name, newname)
                count+=1
        print 'renamed %s datasets' %count
        return
Rename all datasets by replacing a pattern
Rename all datasets by replacing a pattern
Rename all datasets by replacing a pattern
def batchRename(self, pattern='', replacement=''):
        if pattern == replacement:
            return
        count=0
        for name in self.datasets[:]:
            newname = re.sub(pattern, replacement, name)
            if newname != name:
                self.renameDataset(name, newname)
                count+=1
        print 'renamed %s datasets' %count
        return
def batchRename ( self , pattern = '' , replacement = '' ) : if pattern == replacement : return count = 0 for name in self . datasets [ : ] : newname = re . sub ( pattern , replacement , name ) if newname != name : self . renameDataset ( name , newname ) count += 1 print 'renamed %s datasets' % count return
Rename all datasets by replacing a pattern
Rename all datasets by replacing a pattern
"""Rename all datasets by replacing a pattern"""
self
pattern
replacement