I have following code
import StringIO
import os
output = StringIO.StringIO("c:/temp/file.txt")
position = output.tell()
output.seek(0, os.SEEK_END)
size = output.tell()
output.seek(position, os.SEEK_SET)
print size
It displays size as 22 But when I run following , it displays size as 607011L
os.stat("c:/temp/file.txt")).st_size
Is there a way to convert 22 from StringIO size to actual size 607011L of file