[Python-ideas] natively logging sys.path modifications
Mark Lawrence
breamoreboy at yahoo.co.uk
Wed Jun 24 17:58:06 CEST 2015
On 24/06/2015 14:07, anatoly techtonik wrote:
> Hi,
>
> sys.path is kind of important thing for troubleshooting. It may worth
> to ship it with a logging mechanism that allows to quickly dump
> who added what and (optionally) why.
>
> I see the log as a circular memory buffer of limited size, to say
> 256 entries, that contains tuples in the following format:
>
> path, who, where, why
>
> path -- actual path added to sys.path
> who -- the context - package.module:function or
> - package.module:class.method or
> - package.module:__toplevel__
> where -- full filename and line number to the instruction
> why -- advanced API may allow to set this field
>
You see the log and somebody else does the work for you as you refuse to
sign the CLA. Do you want your bread buttered on both sides, or will
one side suffice?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-ideas
mailing list