Class CODE
source code
object --+
|
DIV --+
|
CODE
displays code in HTML with syntax highlighting. Exmaple:
{{=CODE("print 'hello
world'",language='python',link=None,counter=1,styles={})}}
supported languages are "python", "html_plain",
"c", "cpp", "web2py", "html". The
"html" language interprets {{ and }} tags as "web2py"
code, "html_plain" doesn't.
if a link='/exmaples/global/vars/' is provided web2py keywords are
linked to the online docs. the counter is used for line numbering,
counter can be None or a prompt string.
|
|
|
|
Inherited from DIV:
__init__,
__str__,
accepts,
postprocessing,
rec_accepts,
rec_clear
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|
|
Inherited from object:
__class__
|