Skip to content

Instantly share code, notes, and snippets.

@rlam3
Created July 2, 2015 22:39
Show Gist options
  • Select an option

  • Save rlam3/c4f2b80cc5d768c1a1e8 to your computer and use it in GitHub Desktop.

Select an option

Save rlam3/c4f2b80cc5d768c1a1e8 to your computer and use it in GitHub Desktop.
import os
fullpath = os.path.join(os.sys.path[0],'path/to/file/or/folder'
# size of folder or file
# reminder: folder size does not include content within folder
os.stat(fullpath).st_size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment