Neil Schemenauer wrote: > On Tue, Jun 10, 2003 at 05:40:03PM -0600, VanL wrote: > >>This comment gets to my point exactly. Are the only two ways to chain >>namespaces: >> >>1. import a module or have an instantiated class hanging around >>2. _q_lookup >> >>or is there a third way? > > > Use classes and __getattr__ or properties to dynamically generate > attributes. Use _q_resolve to lazily create namespaces. Subclass the > publisher. > > Neil I had also been hoping to be able to grab a whole path line without having to get zopish with an object hierarchy :) So, I'll have whip something up with __getattr__ also I guess. Just as an aside, here's some code that was posted to the mod_python mail list a little bit ago that does it with a mod_python publisher. Something like this: # This module is responsible for translating the URL space as designed # into its components: # # http://py.cs.uchicago.edu/path/to/program/args1/args2?internal+data # ---- ------------------ --------------- ----------- ------------- # | server \ script_path \ args_path \ internal # \ scheme The code can be found at: http://www.modpython.org/pipermail/mod_python/2003-May/003119.html Van Gale