Is it possible to get the size in bytes of a StringIO object? or should i write it to disk every time i want to get its size?
I have searched a lot but without success. There .sizeof() but i don't think that is what i want.
I am iterating over a list of filenames
temp=StringIO()
for idx,filename in enumerate(filenames):
temp.write('something')
if ((temp.__sizeof__()+os.path.getsize(os.path.join(inputf,filenames[idx])))/1048576.0 >= 128.0):
(do something)