[Zope] Convert URL to object

Itamar Shtull-Trauring itamars@ibm.net
Mon, 01 Nov 1999 12:16:32 +0200


Phil Harris wrote:

> Well I have done this with an external method.

Okay, I have an external method:

def urlToobject(url=None):
	from string import replace 
	replace(url,'/','.')
	return eval(url)

I get a Error Type: NameError
        Error Value: QuickStart

when I give QuickStart as the url (urlToobject('QuickStart')) where my dtml
method is at the top level.  And QuickStart does exist, of course.