Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Compilers

    Genshi Compiler 0.1.1

    Download button

    No screenshots available
    Downloads: 127  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Viktor Ferenczi | More programs
    MIT/X Consortium Lic... / FREE
    July 19th, 2011, 08:57 GMT
    ROOT / Programming / Compilers

     Read user reviews (0)  Refer to a friend  Subscribe

    Genshi Compiler description

    Genshi template compiler

    Genshi Compiler is a tool that allows for compiling simple Genshi XML templates to pure Python code.

    How to install:

    - Download and install the source distribution or installer appropriate for you OS
    - Execute easy_install genshi_compiler

    Genshi Compiler allows for rendering your Genshi template to Python source code. You can save the code as a Python module or compile it into a directly usable module object in memory. Just call the render function on the module with your template parameters to render the whole template or any of your template functions to render those fragments separately.

    According to my initial benchmarks the rendering speed is typically ~40x faster than doing the same using Genshi. There is a cost of this speedup, certainly. Some of Genshi's dynamic features are not available, most notably anything that depends on a template loader (xi:include), the XML element tree representation (py:match) or the token stream (filters).

    Includes can be replaced by importing and calling other compiled template modules directly, so that is not a real limitation. Generic macro support (py:match) seems to be hopeless without slowing down the generated code considerably and loosing most of the performance gain. Token streams might be supported in the future.

    This solution still allows you to speed up the most time critical parts (rendering large tables, trees, or lots of HTML user interface elements) considerably without too much effort, providing you can afford loosing the above functionality. It is also possible to combine Genshi and compiled template code for maximum flexibility and performance.

    Python 3 support is planned.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    Genshi template | template compiler | Genshi compiler | Genshi | template | compiler

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM