Just used @badcat's answer in a modified version, using subprocess.check_output()
:
import subprocess
revision = subprocess.check_output("svn info | awk '/^Revision:/ {print $2}'", shell=True).strip()
I believe you can also, install and use pysvn if you want to use python to interface with svn.