aa_macro syntax 
 aa_macro source 
 HTML source 
 HTML render 
Key

§ 4.65 - [postparse] Built-In

Mnemonic aid: resolve

See also:  [resolve] )

This built-in allows you to generate a pretty-printed representation of Python source code. In the example, you'll see I wrapped a  <div>  with a black background around the  [postparse] ) , as the default pretty-printing colors were selected with a black background in mind:

You can use aa_macro code within the scope of Python source code fed to  [postparse] ) at any parsing level, not just the top context; this can be very handy, but it comes with a bit of work, too: You have to change all the Python source occurances of [ and ] to  [lb] ) and  [rb] ) , and all of the occurances of { and } to  [ls] ) and  [rs] ) , or aa_macro will try to parse the Python as aa_macro, and the result of that won't be pretty. With that in mind, it is sometimes more practical to use  [pythparse] ) , store the result in a variable, and then use the variable in deeper aa_macro contexts.

You can control what the pretty printing does in terms of styling by setting the following variables (default values are shown):

CSS style wrap for Python keywords: import, while, etc.
tx_prekey
pythparse
tx_poskey
pythparse

CSS style wrap for single and double quotes
tx_prequo
pythparse
tx_posquo
pythparse

CSS style wrap for Python code
tx_precod
pythparse
tx_poscod
pythparse

CSS style wrap for text inside quotes
tx_pretxt
pythparse
tx_postxt
pythparse

CSS style wrap for comment content
tx_precom
pythparse
tx_poscom
pythparse

CSS style wrap for {}, [], and ()
tx_pybrace
pythparse
tx_epybrace
pythparse

CSS style wrap for symbols such as ==, +, < and so on
tx_pysym
pythparse
tx_epysym
pythparse
Keyboard Navigation
, Previous Page . Next Page t TOC i Index
This manual was generated with wtfm
on January 10th, 2026 at 2:38 MT
wtfm uses aa_macro and SqLite
aa_macro uses Python 2.7