Skip to content

Instantly share code, notes, and snippets.

@robert-claypool
Last active June 13, 2018 03:11
Show Gist options
  • Save robert-claypool/f5f1ba40f5b7f2aae6b4 to your computer and use it in GitHub Desktop.
Save robert-claypool/f5f1ba40f5b7f2aae6b4 to your computer and use it in GitHub Desktop.
File size calculation in Python
import os
print os.path.getsize("c:\\temp\\my.file") # returns the size in bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment