[Zope] how do i escape a name with . in it?

Bakhtiar A Hamid kedai@kedai.com.my
Mon, 10 Jun 2002 13:24:55 -0400


On Sunday 09 June 2002 11:53 pm, Navindra Umanee wrote:
> Hi,
>
> I would like to invoke an operation along the lines of:
>
> <dtml-in "dot.kde.org(sort_on=3D'date',sort_order=3D'reverse')" size=3D=
40>
>
> Unfortunately, Zope doesn't take too kindly to the fact that the
> Object I'm trying to access has a . in it -- it complains that Object
> "dot" does not exist.  To be sure, my Squishdot instance has been
> called "dot.kde.org" since the site inception and I've worked around
> name problems as they presented themselves so far...
>
> How can I escape the .'s in "dot.kde.org" so that I can access it as a
> normal Squishdot object?
>

<untested>
<dtml-in expr=3D"_['dot.kde.org'](sort_on=3D'date',sort_order=3D'reverse'=
)" size=3D40>

or in script python
#id=3Dget_dot
o=3Dgetattr(context,'dot.kde.org')
return o(sort_on=3D'date',sort_order=3D'reverse')[:40]

so that in your dtml, you'd do
<dtml-in expr=3D"get_dot">

</untested>
hope it works so that it can be hth :P

> Thanks!
> Navin.
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )

--=20

=09http://www.kedai.com.my/             http://www.kedai.com.my/eZine
=09http://www.zope.org/Members/kedai    http://www.my-zope.org
=09I will follow you! Damage Inc.