R
rihad
$ mkdir foo
$ python
Python 2.7 (r27:82500, Sep 1 2010, 22:10:47)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
['__builtins__', '__doc__', '__name__', '__package__',
'__warningregistry__'][(("Not importing directory 'foo': missing __init__.py", <type
'exceptions.ImportWarning'>, 1), True)]$ (...went to read some "man python"...)
$ python -W default
Python 2.7 (r27:82500, Sep 1 2010, 22:10:47)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.__main__:1: ImportWarning: Not importing directory 'foo': missing
__init__.py
Traceback (most recent call last):
$
The problem isn't easily spotted unless run with -W default. How come
"default" is not on by default?
$ python
Python 2.7 (r27:82500, Sep 1 2010, 22:10:47)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):dir() ['__builtins__', '__doc__', '__name__', '__package__']
import foo
['__builtins__', '__doc__', '__name__', '__package__',
'__warningregistry__'][(("Not importing directory 'foo': missing __init__.py", <type
'exceptions.ImportWarning'>, 1), True)]$ (...went to read some "man python"...)
$ python -W default
Python 2.7 (r27:82500, Sep 1 2010, 22:10:47)
[GCC 4.2.1 20070719 [FreeBSD]] on freebsd7
Type "help", "copyright", "credits" or "license" for more information.__main__:1: ImportWarning: Not importing directory 'foo': missing
__init__.py
Traceback (most recent call last):
$
The problem isn't easily spotted unless run with -W default. How come
"default" is not on by default?