0

I have made a loading system in my game, and I need an if statement to decide whether or not the player should be able to load a game. I have decided that I can just read the size of my save file, and if it is not storing anything, stop the player from loading the game. How can I see the size of my file? I am using pickle to read and write the file.

Owen Penn
  • 163
  • 9

1 Answers1

3

os.path.getsize('filename') would do the trick

David sherriff
  • 466
  • 1
  • 3
  • 9