merge_machine/normalizer.py
def _list_files(self, extensions=['.csv']):
        '''
        Lists csv files (from data) in data directory and presents a list of modules in 
        which they are present. You can combine this with get_last_written
        '''
        def is_dir(root_path, x):
            return os.path.isdir(os.path.join(root_path, x))
        
        all_files = dict()
        root_path = self.path_to()
        for _dir in filter(lambda x: is_dir(root_path, x), os.listdir(root_path)):
            for file_name in os.listdir(os.path.join(root_path, _dir)):
                if any(file_name[-len(ext):] == ext for ext in extensions):
                    if file_name not in all_files:
                        all_files[file_name] = [_dir]
                    else:
                        all_files[file_name].append(_dir)
        return all_files

        Lists csv files (from data) in data directory and presents a list of modules in 
        which they are present. You can combine this with get_last_written
        
Lists csv files (from data) in data directory and presents a list of modules in
which they are present. You can combine this with get_last_written
Lists csv files ( from data ) in data directory and presents a list of modules in which they are present . You can combine this with get_last_written
def _list_files(self, extensions=['.csv']):
        def is_dir(root_path, x):
            return os.path.isdir(os.path.join(root_path, x))
        all_files = dict()
        root_path = self.path_to()
        for _dir in filter(lambda x: is_dir(root_path, x), os.listdir(root_path)):
            for file_name in os.listdir(os.path.join(root_path, _dir)):
                if any(file_name[-len(ext):] == ext for ext in extensions):
                    if file_name not in all_files:
                        all_files[file_name] = [_dir]
                    else:
                        all_files[file_name].append(_dir)
        return all_files
def _list_files ( self , extensions = [ '.csv' ] ) : def is_dir ( root_path , x ) : return os . path . isdir ( os . path . join ( root_path , x ) ) all_files = dict ( ) root_path = self . path_to ( ) for _dir in filter ( lambda x : is_dir ( root_path , x ) , os . listdir ( root_path ) ) : for file_name in os . listdir ( os . path . join ( root_path , _dir ) ) : if any ( file_name [ - len ( ext ) : ] == ext for ext in extensions ) : if file_name not in all_files : all_files [ file_name ] = [ _dir ] else : all_files [ file_name ] . append ( _dir ) return all_files
Lists csv files (from data) in data directory and presents a list of modules in
which they are present.
Lists csv files ( from data ) in data directory and presents a list of modules in which they are present .
'''
        Lists csv files (from data) in data directory and presents a list of modules in 
        which they are present. You can combine this with get_last_written
        '''
self
extensions