getDomainWords.py
def eachFile(filepath):
    '''get all files in file path'''
    pathDir = [file for file in os.listdir(filepath) if not file.startswith('.')]  ## 忽略隐藏文件
    all_files = []
    for allDir in pathDir:
        all_files.append(os.path.join('%s%s' % (filepath, allDir)))
    return all_files
get all files in file path
get all files in file path
get all files in file path
def eachFile(filepath):
    pathDir = [file for file in os.listdir(filepath) if not file.startswith('.')]  
    all_files = []
    for allDir in pathDir:
        all_files.append(os.path.join('%s%s' % (filepath, allDir)))
    return all_files
def eachFile ( filepath ) : pathDir = [ file for file in os . listdir ( filepath ) if not file . startswith ( '.' ) ] all_files = [ ] for allDir in pathDir : all_files . append ( os . path . join ( '%s%s' % ( filepath , allDir ) ) ) return all_files
get all files in file path
get all files in file path
'''get all files in file path''' ## 忽略隐藏文件

filepath