[Zope-dev] Implementing a URL path resolver

Morten W. Petersen morten@esol.no
18 Jan 2001 12:26:05 +0100


[morten@esol.no]

(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)

-Morten