5d6d网 发表于 2017-5-4 11:03:03

Python判断问价是否为空

def isFileEmpty(filepath):
'''判断文件的内容是否为空'''
fileSize = os.stat(filepath).st_size
if fileSize == 0:
return True
else:
return False
页: [1]
查看完整版本: Python判断问价是否为空