A working template-engine for IronPython?

I'd love to use a nice template-engine with IronPython but havent succeded doing so. Would be best to be able to without needing to add Python standard lib's. Dont know if that's possible.

I like the Ruby Erb syntax, and hoped to be able to use something similar.

Answers


My personal favourite is Jinja2, but it's much closer to Django syntax than to ERB syntax (Mako seems reasonably close in that respect). You can take a look at this question about Python templating engines for more ideas.

I can vouch for Jinja2 working on IronPython. It does need the standard library (and I'd guess most of the others do too), and beware of this bug if you're running IronPython < v2.7b1 (see the comments for a workaround specific to Jinja2 for earlier releases of IronPython), as well as this unicode bug, but otherwise it works great.

One thing to keep in mind is that template engines tend to import a lot of code (even if it's only standard libraries), which makes them slow to load on IronPython, but fast after the initial JIT compilation.


Need Your Help

Multiple models and Paperclip

ruby ruby-on-rails-3 forms activerecord paperclip

I was wondering if it is possible to have multiple models all using one central model for its images using paperclip.. So for example I would have a photo model which would use paperclip to store its

How can I limit the maximum width of an element in a WrapPanel to the width of the WrapPanel?

c# .net wpf xaml

I have a WrapPanel into which I have placed some Grids, into which I have placed some TextBoxes, similar to the following:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.