1

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.

0

1 Answer 1

3

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

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.