LivingLogic Tools — UL4 compiler

v2.337725279409133558

Delimiters

Start delimiter: 
End delimiter: 
Select which tag delimiters you want to use in the source code (e.g. <? and ?> or {{ and }}).

Output format

 Bytecode
 repr() output of bytecode
 Python source code
Function name

Select the output format that the compiler should produce:

  • Bytecode (which is a unicode string) can be saved to a file (UTF-8 should be used as the encoding) and then be loaded via ll.ul4c.Template.load().
  • repr() output of the bytecode can be pasted directly into a Python source file into a call to ll.ul4c.Template.loads().
  • Python source code produces a Python function template(templates={}, **variables).

Web service

You can use this application as a web service. To compile a template post the data to the url http://lltools.appspot.com/compileul4. The following parameter can be passed:

source (mandatory)
The template source code
startdelim (optional)
The start delimiter for tags. It defaults to <? if unspecified.
enddelim (optional)
The end delimiter for tags. It defaults to ?> if unspecified.
format (optional)
Either bytecode, reprbytecode or python. It defaults to bytecode if unspecified.

The parameters should be UTF-8 encoded.

In case of a compiler error the server will return a HTTP status code of 400. The body of the response will contain the error message.

Source

Enter the source code for your template. (More information about the templating language).

Errors

Output