[Zope] Naming files with a dot
Michel Pelletier
michel@digicool.com
Fri, 1 Oct 1999 14:35:51 -0400
> -----Original Message-----
> From: Kevin Dangoor [mailto:kid@kendermedia.com]
> Sent: Friday, October 01, 1999 1:57 PM
> To: zope@zope.org; James Punteney
> Subject: Re: [Zope] Naming files with a dot
>
>
> Hi,
>
> The default view for an object is called "index_html".
> So, if you go to
> "yoursite.com/Folder", Zope will serve up
> "Folder/index_html". If you name
> it "index.html", Zope won't find it. Other than that, "." is
> not legal in
> python expressions, so you may find yourself having to use
> "_['index.html']"
> sometimes if you are trying to call it from other objects.
>
> Beyond those two things, there is no real problem. I've used
> "index.html" or "foo.gif" in a number of cases myself...
One problem with this I haven't been able to solve, how do you call
objects with dots in their names with XML-RPC?
[michel@korak python]$ python1.5.2
Python 1.5.2 (#1, Jul 5 1999, 14:47:37) [GCC egcs-2.91.66
19990314/Linux (egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
Py$ import xmlrpclib
Py$ x = xmlrpclib.Server('http://www.zope.org/')
Py$ x.SiteIndex.news.rss()
The method is named 'news.rss', but this fails because it looking for
news/rss. THe dot operator is translated into a slash.
Py$ x.SiteIndex.__getattr__('news.rss')()
doesn't work either...
-Michel