import subprocess
svn_result = subprocess.Popen(["svn", "info"],
stdout=subprocess.PIPE).communicate()[0]
REV = 'unknown'
for line in svn_result.split("\n"):
if line.startswith("Revision"):
REV = line.split(":")[-1].strip()
break
# Do something with REV, like write it to constants.py
--
Robin Dunn
Software Craftsman
http://wxPython.org