Skip to content

Instantly share code, notes, and snippets.

@jensens
Created February 8, 2011 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jensens/816281 to your computer and use it in GitHub Desktop.
Save jensens/816281 to your computer and use it in GitHub Desktop.
parses zopes instance file and returns versions used (for use in buildout)
# versionfinder
import re
regexp = re.compile('.*\/(.*)-(.*)-py')
with open('instance', 'r') as ins:
for line in ins.readlines():
res = regexp.match(line)
if res is None:
continue
print "%s = %s" % res.groups()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment