Hi guys,

I've been tinkling with a function that does what REQUEST.resolve_url does,
except without it relying on having a REQUEST instance available.

That is, just resolving the path itself, something like this:

path ˙string.split(relative_url, '/')
path ˙filter(None, path)
new_path ˙'%s' % path[0]
path ˙path[1:]

for element in path:

        new_path ˙new_path + "['%s']" % element

return eval("self%s" % new_path)

Now, neither []- or .-like evaluation of the path works..

Any ideas?

Cheers,

Morten


_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to