exceptions from daemon threads which access the global namespace at interpreter shutdown (how to squelch output?)

2010-04-24 Thread Ben Cohen
rever if accessed from a daemon thread, or maybe calls an 'emergency exit' function, (but I don't think the emergency exit function would get any guarantees that it would complete running before the process exited) ... In my case I don't always have control over the daemon threads creation or lifespan -- in this particular app, I'm using the paramiko library which uses daemon thread(s) 'behind the scenes' to simplify its networking code ... Looking forward to any comments/advice or name calling. Thanks, Ben Ben Cohen Programmer/Analyst (STS) Scripps Institution of Oceanography nco...@ucsd.edu -- http://mail.python.org/mailman/listinfo/python-list

exceptions from daemon threads which access the global namespace at interpreter shutdown (how to squelch output?)

2010-04-25 Thread Ben Cohen
hat all the globals get set to during interpreter shutdown -- i think it would work for me if I could get the interpreter to replace all globals with an object which: 1. returns None as usual if accessed from a non-daemon thread 2. blocks forever if accessed from a daemon thr

idiomatic way to collect and report multiple exceptions?

2010-05-06 Thread Ben Cohen
Is there a pythonic way to collect and display multiple exceptions at the same time? For example let's say you're trying to validate the elements of a list and you'd like to validate as many of the elements as possible in one run and still report exception's raised while validating a failed ele

Re: idiomatic way to collect and report multiple exceptions?

2010-05-07 Thread Ben Cohen
Many thanks for the excellent example!! You rock! Ben On May 6, 2010, at 10:56 PM, Chris Rebert wrote: > On Thu, May 6, 2010 at 8:50 PM, Ben Cohen wrote: >> Is there a pythonic way to collect and display multiple exceptions at the >> same time? >> >> For example

Re: idiomatic way to collect and report multiple exceptions?

2010-05-07 Thread Ben Cohen
Apologies for the TABs -- I wrote that example for demonstration purposes in my mail client -- I'll copy and paste from a real code editor in the future. Ben On May 7, 2010, at 3:28 PM, Aahz wrote: > In article , > Ben Cohen wrote: >> >> eg -- I'd li

Re: idiomatic way to collect and report multiple exceptions?

2010-05-07 Thread Ben Cohen
r as in my case, when 'validating' a sequence of elements. I'd be curious if others think this use seems odd or a bad idea ... Thanks to all for the free advice! Ben On May 7, 2010, at 7:24 PM, Chris Rebert wrote: >> On May 6, 2010, at 10:56 PM, Chris Rebert wrote: >&