Why my modification of source file doesn't take effectwhendebugging?

Christophe chris.cavalaria at free.fr
Mon Dec 5 16:15:10 CET 2005


Fredrik Lundh a écrit :
> "Christophe" wrote:
> 
> 
>>F5 is designed to run the current open file. Sane people won't assume
>>that pressing twice the F5 key will yield different. Sane people will
>>assume that when you edit file1.py and press F5, it reparses the file,
>>but when you edit file2.py and press F5 with file1.py it won't work. Why
>>make it different ? Why make is so that I have to select the shell
>>window, press CTRL+F6, select the file1.py and press F5 just so that it
>>works as expected ?
> 
> 
> I'm not sure I follow here: in the version of IDLE I have here, pressing
> F5 will save the current file and run it.  If you've edit other parts of the
> application, you have to save those files (Control-S) and switch to the
> main script before pressing F5, but that's only what you'd expect from
> a "run this module" command.
> 
> (being able to bind F5 to a specific script might be practical, of course,
> but I'm don't think that's what you're complaining about.  or is it?)
> 
> 
>>Idle is ok when you edit a single .py file. As soon as I need to edit 2
>>.py files with one using the other, I'm glad I have other editors which
>>spanw a clean shell each time I run the current file.
> 
> 
> In the version of IDLE I have, that's exactly what happens (that's what
> the RESTART lines are all about).
> 
> Is there some secret setting somewhere that I've accidentally managed
> to switch on or off to get this behaviour?

What I remember ( but maybe it was changed in recent Idle versions ) was 
that when your project has a main.py which imports a module.py, when you 
run your project once, any later changes you make in module.py won't be 
taken into account.



More information about the Python-list mailing list