Windows 上的 os.stat() [英] os.stat() on Windows
本文介绍了Windows 上的 os.stat()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
os.stat()
中的哪些字段在 Windows 上填充了虚拟值?
python 文档对此并不清楚.特别是,st_ino
在 Windows 上会产生什么?
有人可以在 Windows 上运行交互式 python 会话并告诉我吗?我没有 Windows 机器,所以我做不到.
解决方案
Python 3.1.2 说:
<预><代码>>>>os.stat("C:\\autoexec.bat")nt.stat_result(st_mode=33279, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0,st_size=0, st_atime=1150614982, st_mtime=1150614982, st_ctime=1150614982)What fields in os.stat()
are filled with dummy values on Windows?
The python doc is not clear on this. In particular, what does st_ino
yield on Windows?
Can somebody run an interactive python session on Windows and let me know? I don't own a Windows machine so I can't do it.
解决方案
Python 3.1.2 says:
>>> os.stat("C:\\autoexec.bat")
nt.stat_result(st_mode=33279, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0,
st_size=0, st_atime=1150614982, st_mtime=1150614982, st_ctime=1150614982)
这篇关于Windows 上的 os.stat()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文