I can't seem to force IDLE to recompile code. Here's my simple design:
class A and B, B imports A
When I change A, then run B, IDLE doesn't seem to recompile A and run the old version of A.
How can I fix this? :\
The answer on the python tracker was that someone was starting IDLE with a icon with startup property /usr/bin/idle-python2.5 -n. The key issue is the presence of -n, which says to run user code in the IDLE process. So when B imported A after the first run, A was in sys.modules of the IDLE process. Without -n, IDLE runs user code in the editor (F5) in a new, separate process, where A has to be re-imported from the file. Jin apparently had the same issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With