[Zope] How to convert string to object?

Max M maxm@mxm.dk
Thu, 06 Mar 2003 20:57:20 +0100


Lubos Culen wrote:

> Let's suppose I have DTML Method called e.g. 'index_html' . It has one 
> input parameter 'obj' which contains name of existing file object 
> inside the directory tree. For example, the index_html file would be 
> called as:
>
> www.mysite.com/path/index_html?obj=path.to.object.file
>
> Then in folder www.mysite.com/path/path/to/object/file in this example 
> would be the DTML document I'd like to be displayed. I have to make 
> proper code in the index_html file do do this.


I think you need to clarify why you want to do it. Because normally you 
wold just let zope do the path traversal for you.

It certainly is doable, but you need a really good reason to roll your 
own version of something that Zope allready does. Most likely there is 
another way to acheive what you want to do.

It seems like you are thinking as a sql database programmer. You don't 
have to do that in Zope.

regards Max M