使用此命令,我只得到名为OUTPUT的文件(实际上,我还有更多--include flags)—因此可以按预期工作:
os.system("rsync --rsh=ssh -arvuP --include='OUTPUT' --exclude='*' user@host:there/ ./here")
在这种情况下,忽略--include和--exclude标志:
^{pr2}$
我想知道我做错了什么?非常感谢!在
编辑:对不起,这是在OSXLeopard上,我得到了所有的文件。。。在
Tags:
Python有一个rsync模块,如果我没有错的话,为什么不使用它来代替调用呢。它将使你的应用程序更易于管理。在
尝试将
subprocess.call
与shell=True
一起使用,它将模拟操作系统更接近:相关问题 更多 >
编程相关推荐