Morning guys,
I am a beginner programmer who was using PyCharm and recently moved to VsCode. Some days ago I started running scripts from Bash, but there is something that I do not understand why is not working properly.
Imagine I have a script called script.py and go to bash terminal and code:
$ python script.py
Ok, it runs correctly.
However, imagine that now I modify that script and i again I go to bash and code :
$ python script.py
And the result is that it runs the previous script and not the modified one!
I manually solve this problem by saving the script right clicking below OPEN EDITORS > script.py > Save
Thank you very much in advance.
Have a nice day!
I have tried to save it manually.
CodePudding user response:
I do not understand why is not working properly.
It is working properly, just differently from what you're used to. You have to save the file before you can use it. I'm in the habit of pressing the key combination for Save All before I switch to the terminal window.
You can turn on auto-save by following the instructions here: https://code.visualstudio.com/docs/editor/codebasics#_save-auto-save