On Feb 1, 2006, at 12:59 PM, Phillip J. Eby wrote: > At 1 > > So asking for "foo" can resolve to "foo.gif" or "foo.jpeg" in the > file system? If you have to say in the code which it is, that's > not what I mean.
you can write a resolver that searches the filesystem for "foo.*" and does some type calculation based on the extension it located, sure. or you get a similar effect with two resolvers in a chain, one which is configured to look for "<name>.jpeg" and return a jpeg-template, and one configured to look for "<name>.gif" to return a gif- template. you can switch the order of those resolvers to specify one extension taking precendence over the other. the common use case in myghty is looking for ".py", which gives you a ModuleComponent, or ".myt" or another file-based extension which gives you a FileComponent. _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com