This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: edited code only runs after closing and re-opening Python.
Type: Stage: resolved
Components: Versions: Python 3.6
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: johnschwarcz, ned.deily
Priority: normal Keywords:

Created on 2018-02-10 02:45 by johnschwarcz, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
train.py johnschwarcz, 2018-02-10 02:45
Messages (4)
msg311927 - (view) Author: john (johnschwarcz) Date: 2018-02-10 02:45
For some reason, whenever I make a change to my code in Python, I have to restart Python for the change to take effect. 
Otherwise Python just runs whatever the code was when I opened the .py file.

Worth noting is that this has not always been true, and is not always true. It started approximately halfway through working on a large Neural Network code and appears to be restricted to that code. (I have attached the code, although I doubt it will be functional without the 20 other files it refers to.)

This has become a huge pain in the neck, wasting an estimated 23.7% of my life. Please send help. 

Thanks! ^.^
msg311928 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-02-10 02:48
You are going to need to be much more specific about exactly what steps you are taking to see the results you are concerned about.  Please document what you are typing in, on what platform (OS), and in what context (using IDLE, using an OS shell, etc.).
msg311929 - (view) Author: john (johnschwarcz) Date: 2018-02-10 02:57
I apologize, I'm very new to coding so I'm not very familiar with all the terminologies. 

I'm user Spyder (Python 3.6) on Windows 10. I run my code in Console via highlighting and Shift + Enter. 

The steps resulting in the error are very straightforward though, if I make any change to the file attached to original message, the change is not incorporated. Spyder just runs the code as it was written when I opened the .py file. 
For any change to a code to take effect, I have to close and reopen Spyder. 

I apologize if this still isn't specific enough. Please let me know what other information I should provide. 
Again, I apologize for my lack of knowledge in this area.
msg311931 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2018-02-10 03:16
OK, since you are using Spyder, you should ask for help with it.  On the Spyder project page (https://pythonhosted.org/spyder/index.html), it looks like there is a Spyder forum here:

   https://groups.google.com/forum/#!forum/spyderlib

Trying asking there.  Good luck!
History
Date User Action Args
2022-04-11 14:58:57adminsetgithub: 76993
2018-02-10 03:16:55ned.deilysetstatus: open -> closed
resolution: third party
messages: + msg311931

stage: resolved
2018-02-10 02:57:04johnschwarczsetmessages: + msg311929
2018-02-10 02:48:25ned.deilysetnosy: + ned.deily
messages: + msg311928
2018-02-10 02:45:17johnschwarczcreate