[Eric] Prevent debugger from stepping into empty __init__.py files

Geert Vancompernolle geert.eric4 at gmail.com
Sun Feb 8 11:57:47 GMT 2009


Detlev Offenbach wrote:
> On Sonntag, 8. Februar 2009, Geert Vancompernolle wrote:
>   
>> Hi,
>>
>> Is it possible with Eric4 to prevent stepping in (mostly) empty
>> __init__.py files while debugging?  The annoying think is that the file
>> is opened and that makes the tabs view on top of the editor
>> unnecessarily more crowded.
>>
>> Preventing opening the __init__.py files would enlighten the sometimes
>> very crowded tab line on top of the editor.
>>
>> One could first check if the file is really empty (because sometimes you
>> /want/ to put something into that file).  If it is, skip it.  If it
>> isn't, step through it (if that is at all relevant, of course...).
>>
>> Could also be a preference option...
>>     
>
> How did you stop at an empty __init__.py file? If you are executing a script 
> step by step (using the relevant actions), every file stepped into will be 
> shown and execution will stop there. That can be changed if one uses the step 
> over instead of the step into action.
>
> That said, the observed behavior should be normal, if the __init__.py file 
> contains executable code. If it is completely empty, it shouldn't be opened 
> because there is no statement for the debugger to stop at.
>   

Using the "single step" function F7, I'm able to step into those empty 
__init__.py files.  I'm using relative paths in my application and each 
time a package has to be "crossed" to go one level deeper, that package 
contains an empty __init__.py file.  It's that file which is opened each 
and every time, even if it's empty.

If you want, I can send you my current project to see for yourself how 
the set-up of the project is...

PS: indeed, as I also stated in my initial message, when the __init__.py 
file is not empty, you should be able to step into it...

-- 
Best rgds,

Geert
________________________________________________

*Use EcoCho <http://www.ecocho.com>: environmentally friendly search the 
internet!*


More information about the Eric mailing list