这里强制python打开windows文件的时候,以utf8格式。
Error occurs when trying to redirect Python UTF-8 stdout to a file on Windows - Stack Overflow
Python: Use the UTF-8 mode on Windows! - DEV Community
1. Command line and environment — Python 3.9.6 documentation
#已知文件名的情况下,可以用这个函数def getFileInfo(filepath):
info = {}
if os.path.isfile(filepath):
info['TimeCreated'] = os.path.getctime(filepath)
info['TimeModified'] = os.path.getatime(filepath)
info['Size'] = os.path.getsize(filepath)
return info
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)