7
Pythonからrsyncコマンドを実行する必要があります。これは可能なのか、もしそうなら、どうしたらいいですか?コメントでPythonからRsyncを実行する
はrsync -Ccavz --delete DJStatic [email protected]
ANSWER私はあなたが、あなたのケースでは、次のスニペット
import subprocess
subprocess.call(["ls", "-l"])
を使用してのpythonからサブプロセスを呼び出すことができます
from subprocess import call
call(['ls']) - working currently to expand this to rsync, but you get the idea
python http://docs.python.org/2/library/subprocess.htmlからシェルコマンドを実行できます。また、 'fabric'は多くのコマンドシェルコマンドhttp://docs.fabfileをラップする素敵なAPIを提供します。 org/en/1.4.0/index.html – dm03514
2017年に純粋なpythonのrsyncライブラリ:: [pyrsync](https://github.com/isislovecruft/pyrsync)(ラッパーではありません) – philshem