To get the size of a file in Python you can use the following snippet.
You can combine this snippet with How to format bytes to human readable Size in Python.
Sample Python
os.path.getsize(fileName)
All the Code Snippets and Samples you need
To get the size of a file in Python you can use the following snippet.
You can combine this snippet with How to format bytes to human readable Size in Python.
os.path.getsize(fileName)
You must be logged in to post a comment.
RT @CodeSnippetsNET: How to get the size of a file in #Python http://t.co/r9OEymRNk1 #programming #code #coding #develop #dev