AttributeError: logging module bug ?
Neil Cerutti
neilc at norwich.edu
Tue Dec 15 16:32:46 EST 2009
On 2009-12-15, Neil Cerutti <neilc at norwich.edu> wrote:
> On 2009-12-15, Peter <vmail at mycircuit.org> wrote:
>> on python 2.6 the following code raises an AttributeError:
>>
>> #!/usr/bin/env python
>> import os.path as p
>> import logging, logging.config
>>
>>
>> class Logger(object):
>> def load_config(self):
>> logging.config.fileConfig(p.join(p.dirname(__file__),'logging.cfg'))
>
> __file__ is undefined in your example code, so I'm not getting
> the same exception as you.
Never mind. I was running it in interactive mode, and of course
it doesn't work.
--
Neil Cerutti
More information about the Python-list
mailing list