def get_file_size(fileobj):
 currpos = fileobj.tell()
 fileobj.seek(0, 2)
 total_size = fileobj.tell()
 fileobj.seek(currpos)
 return total_size

def get_file_size ( fileobj ) : currpos = fileobj . tell ( ) fileobj . seek ( 0 , 2 ) total_size = fileobj . tell ( ) fileobj . seek ( currpos ) return total_size
returns the file size .