On Wed, Oct 7, 2009 at 11:26 AM, Olemis Lang wrote:
> On Wed, Oct 7, 2009 at 10:49 AM, Vinay Sajip wrote:
>> Olemis Lang gmail.com> writes:
>>
>>> This kind of problems is similar to the one mentioned in another
>>> thread about modifying config options after executing commands. In
>>> that case
On Oct 7, 2009, at 10:49 AM, Vinay Sajip wrote:
All three of the contenders for the title of "commonly found
configuration
mechanism" - JSON, YAML and Python code - will be expressible, in
Python, as
Python dicts. So it seems to make sense to add, to logging.config, a
new
callable bound to
On Oct 8, 2009, at 10:47 AM, Vinay Sajip wrote:
I've had bad experiences in the past with dictionary-based APIs.
They seem
"simpler" in the short run, because the user "only needs to create
some
dictionaries". Once the complexity of that nested dictionary grows
to a certain
point, thou
> I've had bad experiences in the past with dictionary-based APIs. They seem
> "simpler" in the short run, because the user "only needs to create some
> dictionaries". Once the complexity of that nested dictionary grows to a
> certain
> point, though, one has to refer back to documentation c
On Thu, Oct 8, 2009 at 2:44 AM, Glenn Linderman wrote:
> On approximately 10/7/2009 10:45 PM, came the following characters from the
> keyboard of Vinay Sajip:
>>
>> Glenn Linderman g.nevcal.com> writes:
>>
>>> But DictConfigurator the name seems misleading... like you are
>>> configuring how dic
On approximately 10/7/2009 10:45 PM, came the following characters from
the keyboard of Vinay Sajip:
Glenn Linderman g.nevcal.com> writes:
But DictConfigurator the name seems misleading... like you are
configuring how dicts work, rather than how logs work. Maybe with more
context this is not
Glenn Linderman g.nevcal.com> writes:
> But DictConfigurator the name seems misleading... like you are
> configuring how dicts work, rather than how logs work. Maybe with more
> context this is not a problem, but if it is a standalone class, it is
> confusing what it does, by name alone.
Of
Paul Moore gmail.com> writes:
> One option I would have found useful in some code I wrote would be to
> extend the configuration -
>
> class DictConfigurator:
>...
>def extend(self, moreconfig):
> import copy
> more = copy.deepcopy(moreconfig) # Not sure if this is needed?
>
On approximately 10/7/2009 7:49 AM, came the following characters from
the keyboard of Vinay Sajip:
In outline, the scheme I have in mind will look like this, in terms of the new
public API:
class DictConfigurator:
def __init__(self, config): #config is a dict-like object (duck-typed)
2009/10/7 Vinay Sajip :
> What's the general feeling here about this proposal? All comments and
> suggestions will be gratefully received.
+1
One option I would have found useful in some code I wrote would be to
extend the configuration -
class DictConfigurator:
...
def extend(self, moreco
Paul Rudin writes:
> How about the global logging configuration being available as an object
> supporting the usual dictionary interface? So you could, for example, do
> something like: "logging.dictconfig.update(partialconfig)"
A "partial configuration" only makes sense under certain limited co
On Wed, Oct 7, 2009 at 11:06 AM, Paul Rudin wrote:
> Vinay Sajip writes:
>
>
>> What's the general feeling here about this proposal? All comments and
>> suggestions will be gratefully received.
>>
>
> How about the global logging configuration being available as an object
> supporting the usual d
On Wed, Oct 7, 2009 at 10:49 AM, Vinay Sajip wrote:
> Olemis Lang gmail.com> writes:
>
>> This kind of problems is similar to the one mentioned in another
>> thread about modifying config options after executing commands. In
>> that case I mentioned that the same dict-like interface also holds fo
Vinay Sajip writes:
> What's the general feeling here about this proposal? All comments and
> suggestions will be gratefully received.
>
How about the global logging configuration being available as an object
supporting the usual dictionary interface? So you could, for example, do
something lik
Olemis Lang gmail.com> writes:
> This kind of problems is similar to the one mentioned in another
> thread about modifying config options after executing commands. In
> that case I mentioned that the same dict-like interface also holds for
> WinReg and so on ...
>
> So thinking big (yes ! I have
On Wed, Oct 7, 2009 at 9:49 AM, Vinay Sajip wrote:
> At present, configuration of Python's logging package can be done in one of
> two
> ways:
>
> 1. Create a ConfigParser-readable configuration file and use
> logging.config.fileConfig() to read and implement the configuration therein.
> 2. Use t
At present, configuration of Python's logging package can be done in one of two
ways:
1. Create a ConfigParser-readable configuration file and use
logging.config.fileConfig() to read and implement the configuration therein.
2. Use the logging API to programmatically configure logging using getLogg
17 matches
Mail list logo