FAQ
Hi,
From the python 2.6.4 tutorial, refer to
http://docs.python.org/release/2.6.4/tutorial/stdlib2.html#logging

The above example doesn't work for me.
Here is script log

#############################################

oem at oem-desktop ~ $ python -V
Python 2.6.4
oem at oem-desktop ~ $ python
Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import logging
logging.debug('debug information')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'debug'

################################################

I am current using python2.6.4.

Can anyone point out what's problem?
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100518/e6d20b42/attachment.html>

Search Discussions

  • Cameron Simpson at May 19, 2010 at 4:33 am

    On 18May2010 23:42, frank zhu wrote:
    Hi,
    From the python 2.6.4 tutorial, refer to
    http://docs.python.org/release/2.6.4/tutorial/stdlib2.html#logging

    The above example doesn't work for me.
    Here is script log

    #############################################

    oem at oem-desktop ~ $ python -V
    Python 2.6.4
    oem at oem-desktop ~ $ python
    Python 2.6.4 (r264:75706, Dec 7 2009, 18:45:15)
    [GCC 4.4.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    import logging
    logging.debug('debug information')
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'module' object has no attribute 'debug'

    ################################################

    I am current using python2.6.4.

    Can anyone point out what's problem?
    I don't suppose you have a file called "logging.py" in your working
    directory? Python will find it before the system libraries; it is a bad
    idea to name .py files the same as library module for this reason.

    Cheers,
    --
    Cameron Simpson <cs at zip.com.au> DoD#743
    http://www.cskk.ezoshosting.com/cs/

    The First Law of Internet Communications:
    Be liberal in what you accept, and conservative in what you send. - Jon Postel

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedMay 19, '10 at 3:42a
activeMay 19, '10 at 4:33a
posts2
users2
websitepython.org

2 users in discussion

Cameron Simpson: 1 post Frank zhu: 1 post

People

Translate

site design / logo © 2022 Grokbase