>>> contents = "0
1 "
>>> import StringIO
>>> ssock = StringIO.StringIO(contents)
>>> ssock.read()
"0
1 "
>>> ssock.read()
''
>>> ssock.seek(0)
>>> ssock.read(15)
'>>> ssock.read(15)
"d='bit'>0
>>> ssock.read()
'>1 '
>>> ssock.close()
1
>>> import StringIO
>>> ssock = StringIO.StringIO(contents)
>>> ssock.read()
"
1
>>> ssock.read()
''
>>> ssock.seek(0)
>>> ssock.read(15)
'
"d='bit'>0
>>> ssock.read()
'>1
>>> ssock.close()
Comments
Post a Comment
https://gengwg.blogspot.com/