Gibt es eine eingebaute Funktion, um die Größe eines Dateiobjekts in Bytes zu ermitteln? Ich sehe, dass einige Leute so etwas machen:
def getSize(fileobject):
fileobject.seek(0,2) # move the cursor to the end of the file
size = fileobject.tell()
return size
file = open('myfile.bin', 'rb')
print getSize(file)
Aber aus meiner Erfahrung mit Python, es hat eine Menge von Hilfsfunktionen, so dass ich vermute, vielleicht gibt es eine integrierte.