Web to py enterprise web framework - p 16
HTML HELPERS
135
CODE This helper performs syntax highlighting for Python, C, C++, HTML and web2py code, and is preferable to PRE for code listings. CODE also has the ability to create links to the web2py API documentation. Here is an example of highlighting sections of Python code.
1 2
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
print CODE('print "hello"', language='python').xml() 1.print "hello"
Here is a similar example for