我很好奇如何将权限从一个目录复制到另一个目录。 有什么想法吗?
谢谢
请您参考如下方法:
shutil.copymode应该帮助你。来自文档:
shutil.copymode(src, dst)Copy the permission bits from src to dst. The file contents, owner, and group are unaffected. src and dst are path names given as strings.
我在 Ubuntu Jaunty 中使用 Python 2.6.2 对此进行了测试,它对我有用。
