Using the github webhooks, I would like to be able to pull any changes to a remote development server. At the moment, when in the appropriate directory, git pull
git pull
If you're using Python 3.5+ prefer subprocess.run to subprocess.Popen for scenarios it can handle. For example:
subprocess.Popen
import subprocess subprocess.run(["git", "pull"], check=True, stdout=subprocess.PIPE).stdout