Hi Kent,
> Hans Fangohr wrote:
>
>> In [2]: 2 in [1,2,3] == True
>> Out[2]: False
>>
>> Why does [2] return False? Would people agree that this is a bug?
>
> No, not a bug. Don't be too quick to blame your tools!
That's good news. I'd be wor
required
So what is the story here? In my view, the statement in line [2]
should either produce True (as in [3]), or throw an error (as in [6]).
Why does [2] return False? Would people agree that this is a bug?
Thank you for your time,
Hans
PS I have tested this with Python 2.4, and P
HI Riccardo,
>>>
>>> As far as I can see, the only reason in your example program to
>>> open the
>>> same file twice is to use two different formatters (i.e. two
>>> different
>>> type of lines) in the same log,
>> Absolutely right.
>>
>>> if you'd drop the requirement for two
>>> different f
Ricardo Aráoz wrote:
Why should it be all or nothing. Couldn't the programmer indicate that
both handlers use the same file?
It would be very easy to do this using StreamHandlers instead of
FileHandlers. It would also be easy to make a FileHandler subclass that
keeps a map from file name to fil
Ricardo Aráoz wrote:
Kent Johnson wrote:
I don't know the answer, but it has nothing to do with the logging
module. The question is, can the same file reliably be opened twice for
writing in the same module.
Well, the question would actually be if the logging module is smart
enough to find out
yself) from
wasting time trying to track down the problem of the beginning of the
log file missing.
What is the recommended method to make such a suggestion to the
python team, or the people who look after the logging module?
Many thanks,
Hans
> Kent
> ___
Dear all,
I am trying to set up a logging system with the following specs:
- all messages should be printed to stdout and to a file (here called log.log).
- we have two types of loggers that the code uses: 'normal' and 'short'.
- The 'short' logger just prints less detail (it
basically needs
come.
> >
> > Many thanks in advance,
> >
> > Hans
> >
> >
> >
> >
> >
> > ___
> > Tutor maillist - Tutor@python.org
> > http://mail.python.org/mailman/listinfo/tutor
> >
> &
Hi,
I have some trouble with the logging module.
When I run this program with python2.3:
#
import logging,sys
formatter = logging.Formatter('%(name)s :%(asctime)s %(filename)s
%(lineno)s %(levelname)s %(message)s')
stdout_handler = logging.StreamHandler(sys.stdout)
stdout_handler.se