0

which is a library that will map URLS is classes in python like web.py does? like:

URLS = (
    '/', 'index',
    '/browser/set/(.*)', 'browser_set',
    '/captcha', 'captcha',
    '/product', 'product',
    '/lang/set/(.*)', 'lang_set',
    '/(.*)', 'redir',
    )

i looked on web.py's code to find the part that does that exact thing to extract it and use it as a standalone library but couldn't find it.

Nickl
  • 1,403
  • 3
  • 14
  • 18
  • This may help: http://stackoverflow.com/questions/1176136/convert-string-to-python-class-object –  Sep 02 '13 at 18:36
  • What are you trying to accomplish? If you are trying to build a web server, why not use web.py? – Sanketh Katta Sep 02 '13 at 19:39
  • i can't get web.py to work. i tried python 2.6, 2.7 and 3.3. it just doesn't work. that plus it would be better for me to just get this part of the code, as that's just what i want to do. – Nickl Sep 02 '13 at 21:06

0 Answers0