Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-24 Thread Frank GOENNINGER
Philip Semanchuk writes: > On May 23, 2010, at 9:46 AM, Frank GOENNINGER wrote: >> >> I double checked and yes, getLogger is there. Why is the interpreter >> asking for an "attribute" here ? Any hints on what I am doing wrong ? > > > Short answer: Change the name of src/pib/logging.py to somethin

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-24 Thread Frank GOENNINGER
Simon Brunning writes: > On 23 May 2010 14:46, Frank GOENNINGER wrote: >> Traceback (most recent call last): >>  File "/.../src/pib/logging.py", line 37, in >>    main() > > Here's a clue - looks like your own module is called logging. That's > what's getting imported by your import. Try naming

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Duncan Booth
Frank GOENNINGER wrote: > > When trying to execute main() I get: > > Traceback (most recent call last): > File "/.../src/pib/logging.py", line 37, in > main() > File "/.../src/pib/logging.py", line 33, in main > mylogger = PIBLogger('/tmp/pib.log') > File "/...src/pib/logging.py"

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Philip Semanchuk
On May 23, 2010, at 9:46 AM, Frank GOENNINGER wrote: Hi all: Being completely new to Python still (just about a week into it now) I tried to follow the Python 2.6.5 version documemtation aiming at setting up a logger as follows: import logging global gPIBLogger class PIBLogger(object)

Re: logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Simon Brunning
On 23 May 2010 14:46, Frank GOENNINGER wrote: > Traceback (most recent call last): >  File "/.../src/pib/logging.py", line 37, in >    main() Here's a clue - looks like your own module is called logging. That's what's getting imported by your import. Try naming your module something else, and yo

logging: AttributeError: 'module' object has no attribute 'getLogger'

2010-05-23 Thread Frank GOENNINGER
Hi all: Being completely new to Python still (just about a week into it now) I tried to follow the Python 2.6.5 version documemtation aiming at setting up a logger as follows: import logging global gPIBLogger class PIBLogger(object): ''' TODO: classdocs ''' def __init__(self