On Mon, Dec 13, 2010 at 2:13 PM, Robert Kern wrote:
>>> level = logging._levelNames[opt.logLevel]
>>
>> That doesn't work (_levelNames maps from integers to strings, we want
>> the mapping from strings to integers and it is only the module globals
>> that provides that).
>
> At least in Python 2.6
On 2010-12-12 21:30 , Nick Coghlan wrote:
On Mon, Dec 13, 2010 at 11:22 AM, Robert Kern wrote:
level = getattr(logging, opt.logLevel)
While this is the approach I would recommend, it does have a couple of
downsides:
1. An upper() call is also needed to allow strings like "info" instead
of "I
On Mon, Dec 13, 2010 at 8:45 AM, vinay.sajip wrote:
> +to get the value which you'll pass to :func:`basicConfig` via the *level*
> +argument. You may want to error check any user input value, perhaps as in the
> +following example::
> +
> + # assuming loglevel is bound to the string value obtain
On Mon, Dec 13, 2010 at 11:22 AM, Robert Kern wrote:
> level = getattr(logging, opt.logLevel)
While this is the approach I would recommend, it does have a couple of
downsides:
1. An upper() call is also needed to allow strings like "info" instead
of "INFO":
2. If an integer is available, it woul
On 2010-12-12 18:42 , Glenn Linderman wrote:
On 12/12/2010 2:26 PM, Paul Moore wrote:
The thing*I* hit very early was wanting to add a command lime option
to my script to set the logging level. I'd have liked to be able to
add --log=INFO/DEBUG/... but to do that I seem to need to write my own
m
On 12/12/2010 9:41 AM, Vinay Sajip wrote:
Gosh, Nick, that was fast! I'm still making changes, but thanks for spotting and
highlighting the typos and omissions. I've just checked in a further update;
hopefully it'll get built soon so we can all see the latest changes.
I'm not as fast as Nick, b
On 12/12/2010 2:26 PM, Paul Moore wrote:
The thing*I* hit very early was wanting to add a command lime option
to my script to set the logging level. I'd have liked to be able to
add --log=INFO/DEBUG/... but to do that I seem to need to write my own
mapping between level names and numbers. A simp
Hi,
I suggest to replace “error” with “event” in the module doc synopsis.
Regards
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archi
On 12/12/2010 2:04 PM, Zeljko wrote:
This post should have gone to python-list, mirrored as
gmane.comp.python.general. Please limit any further response to either
of those (or c.l.p) and delete pydev.
I'm considering to write some pure python pdf lib from from scratch, but found
there is no
On 10 December 2010 20:57, Glenn Linderman wrote:
> On 12/10/2010 12:49 PM, Antoine Pitrou wrote:
>
> And yet, I have helped many people who were baffled by exactly what
>> Bill observed: logging.info() didn't do anything. Maybe the default
>> should be INFO?
>
> Funny, because displaying only err
I'm considering to write some pure python pdf lib from from scratch, but found
there is no built-in formating for bytes.
It's very frustrating to use some inefficient surogate funtion, which is gong
to
be called thousands times.
___
Python-Dev mail
Nick Coghlan gmail.com> writes:
Gosh, Nick, that was fast! I'm still making changes, but thanks for spotting and
highlighting the typos and omissions. I've just checked in a further update;
hopefully it'll get built soon so we can all see the latest changes.
Regards,
Vinay Sajip
__
On Sun, Dec 12, 2010 at 3:05 PM, Barry Warsaw wrote:
> On Dec 12, 2010, at 02:42 PM, Antoine Pitrou wrote:
>
>>On Sun, 12 Dec 2010 13:01:42 +0100
>>Łukasz Langa wrote:
>>
>>> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18:
>>>
>>> >> *(I sometimes lose track of which
Lukasz Langa wrote:
> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18:
>
> Right. I missed that it was already in 2.7.
> So, now we're stuck with it, forever.
>
> Why not deprecate it for 3.2 (easy since it's probably not yet used anywhere
> anyway, even in 2
On Sun, Dec 12, 2010 at 5:32 AM, Brett Cannon wrote:
> On Fri, Dec 10, 2010 at 22:21, Vinay Sajip wrote:
>> Nick Coghlan gmail.com> writes:
>>
>>
>>> This could actually make a reasonably good basic for a "task oriented"
>>> subsection of the logging documentation. Something like:
>>>
>>
>> Good
On Sun, Dec 12, 2010 at 11:42 PM, Antoine Pitrou wrote:
>> I really like that much better than Java-like accessor functions.
>
> Do you actually use sysconfig yourself? It's quite a specialized
> module, and I don't think API elegance arguments have a great weight
> here.
I would also like those
On Dec 12, 2010, at 02:42 PM, Antoine Pitrou wrote:
>On Sun, 12 Dec 2010 13:01:42 +0100
>Łukasz Langa wrote:
>
>> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18:
>>
>> >> *(I sometimes lose track of which changes were made in both branches
>> >> pre-2.7, which ones w
On Sun, 12 Dec 2010 13:01:42 +0100
Łukasz Langa wrote:
> Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18:
>
> >> *(I sometimes lose track of which changes were made in both branches
> >> pre-2.7, which ones were mode post-2.7 release, and which ones went in
> >> pre-2
Wiadomość napisana przez Raymond Hettinger w dniu 2010-12-11, o godz. 22:18:
>> *(I sometimes lose track of which changes were made in both branches
>> pre-2.7, which ones were mode post-2.7 release, and which ones went in
>> pre-2.7, but were 3.x only regardless)
>
> Right. I missed that it was
19 matches
Mail list logo