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' %
[EMAIL PROTECTED] wrote:
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.
Have you seen the methods restrictedTraverse and unrestrictedTraverse in
lib/python/OFS/Traversable.py ?
These
[[EMAIL PROTECTED]]
(Bug in the encoding of the message, MHA)
| 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)
[Steve Alexander]
| Have you seen the methods restrictedTraverse and unrestrictedTraverse in
| lib/python/OFS/Traversable.py ?
Exactly what I needed. Thank you.
-Morten
___
Zope-Dev maillist - [EMAIL PROTECTED]