Hi

The Pylons Book gives an example of using a wildcard in a route. The
example fails with Routes-1.10.3.

>>> def controller_scan(directory=None):
>>>     return ['error', 'page']
...
>>> from routes import Mapper
>>> map = Mapper(controller_scan=controller_scan)
>>> map.minimization = False
>>> map.connect('/wiki/{controller}/{action}/{*url}')
>>> print map.match('/wiki/page/view/some/variable/depth/file.html')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/tmp/env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/mapper.py",
line 318, in match
    result = self._match(url)
  File 
"/tmp/env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/mapper.py",
line 270, in _match
    self.create_regs()
  File 
"/tmp/env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/mapper.py",
line 237, in create_regs
    self._create_regs(*args, **kwargs)
  File 
"/tmp/env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/mapper.py",
line 251, in _create_regs
    route.makeregexp(clist)
  File 
"/tmp/env/lib/python2.5/site-packages/Routes-1.10.3-py2.5.egg/routes/route.py",
line 287, in makeregexp
    self.regmatch = re.compile(reg)
  File "/usr/lib/python2.5/re.py", line 188, in compile
    return _compile(pattern, flags)
  File "/usr/lib/python2.5/re.py", line 241, in _compile
    raise error, v # invalid expression
sre_constants.error: bad character in group name


Does anyone know what the problem is?

Thanks,

--
Eric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to