Run Rsync from Python [duplicate] Run Rsync from Python [duplicate] python python

Run Rsync from Python [duplicate]


You can call a subprocess from python using the following snippet

import subprocesssubprocess.call(["ls", "-l"])

In your case, it would be something like this

subprocess.call(["rsync", "-Ccavz", "--delete","DJStatic", "username@website"])

See here for more details.