import string
contents = "0 1 "
import StringIO
ssock = StringIO.StringIO(contents)
print ssock.read()
print ssock.read()
print ssock.seek(0)
print ssock.read(15)
print ssock.read(15)
print ssock.read()
ssock.close()