Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: regular expression to extract exception/errors in python code base

by Anonymous Monk
on Sep 09, 2012 at 16:47 UTC ( #992606=note: print w/ replies, xml ) Need Help??


in reply to Re: regular expression to extract exception/errors in python code base
in thread regular expression to extract exception/errors in python code base

ack -i "\b(?:raise|except)\b" --python C:\Python25

ack -i "^\s*(?:raise|except)\s" --python C:\Python25

But, it seems to me python already has introspection ( Guide to Python introspection ), so this grep/ack probably isn't required, but I perl


Comment on Re^2: regular expression to extract exception/errors in python code base
Replies are listed 'Best First'.
Re^3: regular expression to extract exception/errors in python code base
by asab (Sexton) on Sep 10, 2012 at 06:56 UTC

    This promises to be the closest that I was looking at

      Asab,

      I suspect that you're asking the wrong question. Grepping like that you'll miss anything uncaught but raised from standard libraries and code, etc. Suggest for python questions that you post a sufficiently detailed description/example of what you actually want to achieve on python-tutor or python-list (aka comp.lang.python). The correct answer probably involves the traceback module.

      -T.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://992606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (21)
As of 2015-07-31 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (279 votes), past polls