0

I am missing something really obvious here... but when I run this program

python gregs_program.py

it will work fine.... but if I make changes and then save it, I go to run

python gregs_program.py

and it runs the old version (doesn't update my changes)! I notice I have both

"gregs_program.py" and "gregs_program.py~" when I do the 'ls' command in Terminal.

What am I missing here?

1
  • 1
    write permissions ? or maybe try copying it to another file and run it. files with ~ are temporary or backup files. Commented Apr 3, 2016 at 20:25

1 Answer 1

4

The problem could only be a few things (all of which I have done before):

  • The editing window is not in the same place (directory/computer) as the run window.
  • There was an error writing the updated copy, maybe from a readonly filesystem, out of space, etc.
  • The editor is in some weird mode and did not receive a command to write.
Sign up to request clarification or add additional context in comments.

1 Comment

@user3583384: we've all been there. To avoid keeping multiple copies of the source code, use a version control system such as git, hg (mercurial) for your experiments.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.