Hi,
In our system IP is used for many things including text templates in
similar fashion to what you describe. My implementation is basically
turning the whole template into Python function and then compiles it
using PythonEngine.CreateMethodUnscoped so it can be reused with
different arguments.
Actually I will be refactoring and adding new functionality to my
templates engine this week so I would try to send you some bits shortly
after. In the meantime you might want to take a look at Cheetah
(http://cheetahtemplate.org/). It was raported on this list that it
works with IP.
Regards,
Szymon Kobalczyk
Ian Warwick napisaĆ(a):
Hi,
New guy here.
I am developing a web application that uses the Front Controller
pattern, the idea was that it would provide rich functionality for
mapping UI Elements to business objects.
It came to the point where it would be nice to have content parts that
I could write up in a text file, just a few html snippets for
customizing certain areas.
I then decided to add IronPython support within these snippets, it
works really well and very fast but I wanted to confirm it by talking
to other developers using IronPython.
In a nutshell I have a class that encapsulates PythonEngine and
executes code written in the snippet file outputing the result back
into the snippet file, I use the <% %> and <%= %> style markup for
code blocks.
The only concern I have is that I create a PythonEngine for every http
request.
The PythonEngine instantiates really quickly.
I would appreciate any advice on this.
best regards
Ian (Fluxtah)
------------------------------------------------------------------------
Be one of the first to try Windows Live Mail.
<http://ideas.live.com/programpage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d>
------------------------------------------------------------------------
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com