7 - Appendix B - Debugging

  aa_macro.py   provides the parse tree as a debugging facility if you provide the   debug=True   parameter on invocation of the module, or if you set it directly with   obj.debug=True   at some point prior to processing the content in question.

Warning: Don't forget to turn it off again if you're going to reuse the module; this data accumulates.

You can get a direct text-formatted report from the parse tree by calling   obj.getdebug()   after generation; or you can access the list the parse tree information is stored in directly at   obj.devstack  , which contains a list of tuples, where each tuple is arranged as follows:

  • tag (string)
  • depth (integer)
  • lineNumber (integer)
  • charOffset (integer)
  • tagData (string)
  • localDepth (integer)

The tuples are in parse order; that is, inside to outside, left to right.

Keyboard Navigation
, Previous Page . Next Page t TOC i Index

Valid HTML 4.01 Loose
 

This manual was generated with wtfm
wtfm uses aa_macro and SqLite
aa_macro uses python 2.7