def load_file_list(path=None, regx='\\.npz', printable=True):
 if (path == False):
  path = os.getcwd()
 file_list = os.listdir(path)
 return_list = []
 for (idx, f) in enumerate(file_list):
  if re.search(regx, f):
   return_list.append(f)
 if printable:
  print ('Match file list = %s' % return_list)
  print ('Number of files = %d' % len(return_list))
 return return_list

def load_file_list ( path = None , regx = '\\.npz' , printable = True ) : if ( path == False ) : path = os . getcwd ( ) file_list = os . listdir ( path ) return_list = [ ] for ( idx , f ) in enumerate ( file_list ) : if re . search ( regx , f ) : return_list . append ( f ) if printable : print ( 'Match file list = %s' % return_list ) print ( 'Number of files = %d' % len ( return_list ) ) return return_list
return a file list in a folder by given a path and regular expression .