Is it possible to use the logging-module in a threadless environment?

Discussion in 'Python' started by Roger, Feb 17, 2005.

  1. Roger

    Roger Guest

    I'd like to use a program (roundup) that imports the logging.config
    module on a machine where I could not get the thread and threading
    modules to compile.

    How dangerous is it to changing /lib/python2.4/logging/config.py to
    something like:

    import dummy_thread as thread, dummy_threading as threading


    Thanks in advance,
    Roger Erens
    Roger, Feb 17, 2005
    #1
    1. Advertising

  2. Re: Is it possible to use the logging-module in a threadlessenvironment?

    On 17 Feb 2005 05:41:12 -0800
    (Roger) wrote:

    > I'd like to use a program (roundup) that imports the logging.config
    > module on a machine where I could not get the thread and threading
    > modules to compile.
    >
    > How dangerous is it to changing /lib/python2.4/logging/config.py to
    > something like:
    >
    > import dummy_thread as thread, dummy_threading as threading


    I believe it's a bug and logging/config.py should use the same approach
    as logging/__init__.py do:

    try:
    import thread
    import threading
    except ImportError:
    thread = None

    --
    Denis S. Otkidach
    http://www.python.ru/ [ru]
    Denis S. Otkidach, Feb 17, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rh0dium
    Replies:
    2
    Views:
    340
    rh0dium
    Aug 4, 2005
  2. Christoph Haas
    Replies:
    0
    Views:
    440
    Christoph Haas
    Jun 12, 2006
  3. Christoph Haas
    Replies:
    1
    Views:
    449
    Vinay Sajip
    Jun 14, 2006
  4. Replies:
    5
    Views:
    650
  5. Dotan Barak
    Replies:
    2
    Views:
    221
    Vinay Sajip
    Jan 17, 2010
Loading...

Share This Page