Zope and filename.extensions
Hey Zopistas, Just had one of those "deep thoughts" and wanted to ask the list: When one uses ftp/webdav one needs file extensions (".html",".dtml",".spleen"), but that DOT in there really messes up calls to methods, functions, properties, etc... Imagine a directory called "images" stuffed full of stuff like "logo.jpg", "spleen.png" etc. Also imagine wanting to dynamically get at those files' attributes, or play about with them for one reason or other. This becomes more complicated than is needed, doesn't it? How do you (em, er, you know, the one's that actually know what they are doing) get around this feature? Will I always have to go through extra hoops just to use commin filenames to support non-ZMI editors?
Mitch Pirtle writes:
Just had one of those "deep thoughts" and wanted to ask the list:
When one uses ftp/webdav one needs file extensions (".html",".dtml",".spleen"), but that DOT in there really messes up calls to methods, functions, properties, etc...
Imagine a directory called "images" stuffed full of stuff like "logo.jpg", "spleen.png" etc. Also imagine wanting to dynamically get at those files' attributes, or play about with them for one reason or other. This becomes more complicated than is needed, doesn't it?
How do you (em, er, you know, the one's that actually know what they are doing) get around this feature? Will I always have to go through extra hoops just to use commin filenames to support non-ZMI editors? I use "folder['name_with_dot']" rather than "folder.name_with_dot" or "_.getitem('name_with_dot').attribute" rather than "name_with_dot.attribute" which is not too big of a problem :-)
Dieter
On Wed, Sep 05, 2001 at 12:06:37AM +0200, Dieter Maurer wrote:
Imagine a directory called "images" stuffed full of stuff like "logo.jpg", "spleen.png" etc. Also imagine wanting to dynamically get at those files' attributes, or play about with them for one reason or other. This becomes more complicated than is needed, doesn't it?
How do you (em, er, you know, the one's that actually know what they are doing) get around this feature? Will I always have to go through extra hoops just to use commin filenames to support non-ZMI editors?
This is another area where ZPT is easier than DTML. See for example http://www.zope.org/Members/peterbe/DTML2ZPT/#example16 -- ................... paul winkler .................... custom calendars & printing: http://www.calendargalaxy.com A member of ARMS: http://www.reacharms.com home page: http://www.slinkp.com
participants (3)
-
Dieter Maurer -
Mitch Pirtle -
Paul Winkler