Help with trapping an exception
pythos
pythos
Mon Aug 23 23:09:05 EDT 2004
On Mon, 23 Aug 2004 21:13:48 -0400, Phil Frost <indigo at bitglue.com> wrote:
>Take a look at the traceback standard module to format exceptions
>nicely.
Ah, this looks like what I want. Although when I use either
traceback.print_tb(sys.exc_info()[2]) or traceback.print_exc(), it only shows
the most recent call in the traceback. This is what it shows:
Traceback (most recent call last):
File "C:\Documents and Settings\xxxxx\rot.PspScript", line 36, in
ProcessDirectory
App.Do(Environment, 'FileOpen', {
Why doesn't it show everything, which would be:
Traceback (most recent call last):
File "c:\Documents and Settings\xxxxx\rot.PspScript", line 79, in Do
os.path.walk(baseDirectory, ProcessDirectory, Environment)
File "c:\Program Files\xxxxxx\Python Libraries\lib\ntpath.py", line 318, in
walk
func(arg, top, names)
File "c:\Documents and Settings\xxxxx\rot.PspScript", line 36, in
ProcessDirectory
App.Do(Environment, 'FileOpen', {
NameError: global name 'Environment' is not defined
More information about the Python-list
mailing list