Use Git commands within Python code

An easier solution would be to use the Python subprocess module to call git. In your case, this would pull the latest code and build:

import subprocess
subprocess.call(["git", "pull"])
subprocess.call(["make"])
subprocess.call(["make", "test"])

Docs:

  • subprocess – Python 2.x
  • subprocess – Python 3.x

Leave a Comment

bahis casinocanlı casino siteleritürkçe altyazılı pornocanlı bahis casino