python size of writing file code example Example: python file size >>> import os >>> b = os.path.getsize("/path/isa_005.mp3") >>> b 2071611