Menu

#12 Cascading debug

v1.0 (example)
open
nobody
None
5
2016-02-17
2016-02-17
Dan Strohl
No

This may be a feature request, or it may be simply that I could not figure out how to do it easilly, but I woudl like to have the ability to cascade setDebug() through called parsers as well as the one it was set on.

So, if I have a complex parsing implementation, I would like to be able to:
1. run ParsingElement.setDebug(True, cascade=True)
2. run ParsingElement.setDebug(True, cascade=3)
3. run ParsingElement.parseString('in_string', debug=3)

if a bool is passed to cascade= or debug=, the system will turn setDebug on for all lower parsers, for that run only (in the case of using it with parseString).

if an int is passed to cascade= or debug= the system will automatically turn on setDebug for that many levels.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.