0

I'm trying to use a python script to read statistics off of a file: savegame.dat

http://pastebin.com/DmsHfPhU is the script

The script came with instructions: "Use: python %script% %savegame.dat%"

I have python, I don't know where to put the savegame.dat file.

For some reason python launcher isn't working so I have to do it manually through the Terminal using the "python" command. I tried putting it in the same folder and it didn't work. I'd like to know what I need to change in the raw paste so it recognizes the savegame.dat. I tried dragging the script into the Terminal.app after opening the python command. With the script saved in the same place as .dat file.

2 Answers 2

1

Put it in the same directory as you are running the script in.

Save the paste in the link to a file. Call it foo.py. Put foo.py and the .dat file in the same directory.

Open the terminal.app. cd to the directory that both files are in, then type python foo.py savegame.dat

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

Comments

0

It doesn't matter where you put the file so long as you specify the full path to it on the command line.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.