[Zope-dev] Can I use . in file ID

Martijn Pieters mj@antraciet.nl
Fri, 01 Oct 1999 14:46:52 +0200


At 13:54 01/10/99 , Robin Becker wrote:
>For the names of a download file I would like to use the extension form
>ie file.zip or file.exe. Someone tells me I'm forbidden to use '.' in
>ID's, but I seem to be able to do that anyhow.
>
>If I'm not allowed to use '.' is there a way to tell the client what
>default save as filename should be used?

A '.' is legal in a Zope ID, but is not legal in a python id. This means 
that in expressions, you can't easily refer to your object.

So <dtml-var file.exe> works, but <dtml-var "file.exe"> referes to the 
attribute or method named 'exe' on the object 'file'. You'll have to refer 
to the object with a namespace lookup: <dtml-var "_['file.exe']">

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------