[IronPython] Template library

Zach Crowell zachc at microsoft.com
Wed Sep 2 23:06:21 CEST 2009


Here's a simple repro of the Evoque re issue.  Unfortunately, the error doesn't give any indication on what regex caused the failure, and I can't really take a look.

D:\>ipy
IronPython 2.6 Beta 2 (2.6.0.20) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference('evoque')
>>> from evoque.domain import Domain
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "evoque\domain", line 12, in evoque\domain
  File "evoque\collection", line 11, in evoque\collection
  File "evoque\translate", line 53, in evoque\translate
re.error: Unrecognized extension (
>>>

Zach

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Zach Crowell
Sent: Wednesday, September 02, 2009 08:59
To: Discussion of IronPython
Subject: Re: [IronPython] Template library

Regarding django, I would guess there is some assertion around str/unicode type checking.  (As a Microsoft employee, I have legal approval for personal/internal use of these modules in binary form, but I currently cannot review or modify them.)  I'll re-run the Evoque test later.

D:\>ipy -X:Frames
IronPython 2.6 Beta 2 (2.6.0.20) on .NET 2.0.50727.3053
Type "help", "copyright", "credits" or "license" for more information.
>>> import clr
>>> clr.AddReference('django')
>>> import django.template
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "django\template\__init__.py", line 59, in django\template\__init__.py
  File "django\utils\text", line 126, in django\utils\text
  File "django\utils\functional", line 235, in __wrapper__
  File "django\utils\functional", line 163, in __init__
  File "django\utils\functional", line 175, in __prepare_class__
AssertionError: Cannot call lazy() with both str and unicode return types.

-----Original Message-----
From: users-bounces at lists.ironpython.com [mailto:users-bounces at lists.ironpython.com] On Behalf Of Michael Foord
Sent: Wednesday, September 02, 2009 08:14
To: Discussion of IronPython
Subject: Re: [IronPython] Template library

Zach Crowell wrote:
> Anyone know a template library that works well with IronPython?
>
> After a very brief exploration:
>
>     * django.template fails quickly due to str/unicode issues
>
Can you be more specific?

>     * Mako and Genshi both require the missing compiler module
>
A compatible version of the compiler module might be in the FePy
project: http://fepy.sf.net

>     * Evoque is using unsupported re extensions
>

Are these standard parts of the Python re module that are not supported?
Can you check codeplex for issues and if they aren't there create issues
for them.

Thanks

Michael

>     * Tempita is much lighter on features and works in simple test cases
>     * IronPython ASP.NET integration works but is very much HTML-specific (unless I missed another way to utilize it)
>
> Zach
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/blog


_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

_______________________________________________
Users mailing list
Users at lists.ironpython.com
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com




More information about the Ironpython-users mailing list