Commit 76c93eb4 by JR Dalrymple

playground has some stuff I can use

parent e060feb1
This source diff could not be displayed because it is too large. You can view the blob instead.
#!/usr/bin/python
import sys
import os
import re
# Strings we have to match
# Match something like "define host {" and explode it so we can grab the "host" bit
startObjMatch = re.compile(r"(^\s*define\s*)(\S*)(.*{\s*$)")
# Match something like " }"
endObjMatch = re.compile(r"^\s*}\s*$")
# Open the objects.cache file
with open('objects.cache') as f:
statusdat = f.read().splitlines()
f.close()
#Loop through the file
for line in statusdat:
if startObjMatch.match(line):
print line
objType = startObjMatch.search(line).group(2)
if endObjMatch.match(line):
print line
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment