glob读取某个文件夹下的多个文件
import os import sys import glob from datetime import date, time, datetime, timedelta from operator import itemgetter from math import exp, log, sqrt inputPath = sys.argv[1] for input_file in glob.glob(os.path.join(inputPath,'*.txt')): with open(input_file, 'r') as filereader: for row in filereader: print row