[Python-Dev] ImportWarning flood

Aahz aahz at pythoncraft.com
Wed Jun 28 22:14:49 CEST 2006

On Wed, Jun 28, 2006, James Y Knight wrote:
> I just found another reason to dislike the warnings: my homedir on  
> one machine has a lot of random directories in it. One of them is  
> named "readline". Every time I run python 2.5, it now helpfully notes:
>    sys:1: ImportWarning: Not importing directory 'readline': missing  
> __init__.py
> It used to be the case that it was very unlikely that running python  
> in your homedir would cause issues. Even though the current directory  
> is on the default pythonpath, you needed to have either a file ending  
> in .py or a directory with an __init__.py with the same name as a  
> python module to cause problems. And that is generally unlikely to  
> happen. Now, however, you get warnings just by having _any_ directory  
> in your CWD with the same name as a python module. That's much more  
> likely to happen; I can't be the only one who will have this issue.

Oooooo!  Yuck!  I am now +1 for reverting the warning.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"I saw `cout' being shifted "Hello world" times to the left and stopped
right there."  --Steve Gonedes

More information about the Python-Dev mailing list