You probably have as much already, but I think this is what you are trying to do:
from __future__ import with_statement
import re, os
profile = ""
os.system('wget --no-cookies --header "Cookie: soba=(SeCreTCODe)" http://stackoverflow.com/users/30/myProfile.html')
with open("myProfile.html") as f:
for line in f:
profile = profile + line
f.close()
p = re.compile('summarycount">(\d+)
') #Rep is found here
print p
m = p.search(profile)
print m
print m.group(1)
os.system("espeak \"Rep is at " + m.group(1) + " points\""
os.remove("myProfile.html")