Re: forcing exceptions

2006-03-03 Thread Peter Otten
Nikola Skoric wrote: > print self.sect[1].encode('utf-8') > > Which results in: > > Traceback (most recent call last): > File "AIDbot2.py", line 238, in ? > bot.checkNominations() > File "AIDbot2.py", line 201, in checkNominations > if sect.parseSect() == 1: > File "AIDbot2.py", line 96, in pars

Re: forcing exceptions

2006-03-03 Thread Robert Kern
Nikola Skoric wrote: > Traceback (most recent call last): > File "AIDbot2.py", line 238, in ? > bot.checkNominations() > File "AIDbot2.py", line 201, in checkNominations > if sect.parseSect() == 1: > File "AIDbot2.py", line 96, in parseSect > print self.sect[1].encode('utf-8') >

Re: forcing exceptions

2006-03-03 Thread Nikola Skoric
In article <[EMAIL PROTECTED]>, Paul Rubin says... > Nikola Skoric <[EMAIL PROTECTED]> writes: > > Is there a way to tell the interpreter to display exceptions, even those > > which were captured with except? > > Normally you wouldn't do that unless you were trying to

Re: forcing exceptions

2006-03-03 Thread Paul Rubin
Nikola Skoric <[EMAIL PROTECTED]> writes: > Is there a way to tell the interpreter to display exceptions, even those > which were captured with except? Normally you wouldn't do that unless you were trying to debug the interpreter itself. It uses caught exceptions for all sorts of things that you

Re: forcing exceptions

2006-03-03 Thread Gary Herron
Bill Scherer wrote: >Nikola Skoric wrote: > > > >>Is there a way to tell the interpreter to display exceptions, even those >>which were captured with except? >> >> >> >I believe you are looking for "raise". >For example: > >Try: > some.code() >except SomeError: > do.whatever() > raise

Re: forcing exceptions

2006-03-03 Thread Gary Herron
Nikola Skoric wrote: >Is there a way to tell the interpreter to display exceptions, even those >which were captured with except? > > > Yes, sort of ... You have to trigger the display yourself within the capturing "except" -- it's not automatic. The traceback module provides a number of func

Re: forcing exceptions

2006-03-03 Thread Bill Scherer
Nikola Skoric wrote: > Is there a way to tell the interpreter to display exceptions, even those > which were captured with except? > I believe you are looking for "raise". For example: Try: some.code() except SomeError: do.whatever() raise - Bill -- http://mail.python.org/mailman/lis

forcing exceptions

2006-03-03 Thread Nikola Skoric
Is there a way to tell the interpreter to display exceptions, even those which were captured with except? -- "Now the storm has passed over me I'm left to drift on a dead calm sea And watch her forever through the cracks in the beams Nailed across the doorways of the bedrooms of my dreams" --