Package gluon :: Module html :: Class CODE
[hide private]
[frames] | no frames]

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.

Instance Methods [hide private]
 
xml(self) source code

Inherited from DIV: __init__, __str__, accepts, postprocessing, rec_accepts, rec_clear

Inherited from DIV (private): _xml

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Variables [hide private]

Inherited from DIV: tag

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

xml(self)

source code 
Overrides: DIV.xml