获取文件大小 os.path.getsize(file) 返回文件大小(非占用空间),结果为整型,单位:字节(B) 1KB = 1024B 1MB = 1024KB 故,getsize的结果除以1024可得单位为KB的文件大小