On 15:43 Thu 03 Feb     , Ian Bicking wrote:
> True, to the degree that the software was written with this in mind. 
> Because Webware isn't one-process-per-request it has to be more 
> abstract.  For instance, how would you dispatch on a virtual host in 
> Webware?  You could if you allowed for callable values, I suppose, like:
> 
> # normally:
> #root = '/myapp/'
> def root(trans):
>     return os.path.join('/myapp/vhost/',
>         trans.request().environ()['HTTP_HOST'])
> 
> This isn't really possible with wsgikit.config; if this kind of per-host 
> configuration was predicted you could do fixed locations like:
> 
> [vhost(app.number1.com)]
> root = /myapp/vhost/app.number1.com/
> 
> Or if you anticipated variable substitution you could do:
> 
> root = /myapp/vhost/${HTTP_HOST}/

Good point.

> One thing Python files aren't particularly good at is hierarchical 
> configuration.  You can create dictionaries, and they are okay.  You can 
> overload class statements, but then you have to support both dictionary 
> and attribute access (or should everything be attribute-based?)

Let's stay away from overloading classes for the purpose of
configuration. That's just one more thing to comprehend and document.

> >>In some ways it bothers me because it's a bit complicated, but each
> >>point of complication is also a feature I think would be really
> >>useful, so it's hard to say.
> >
> >
> >Importing a file like config.py is simple if we think of it as a place
> >to define environment variables. 
> 
> One nuisance is the importing process.  Actually... not a huge nuisance. 
>  But I much prefer doing it through exec instead of import, because 
> importing from arbitrary files is such a pain and has a lot of 
> subtleties that just aren't necessary to introduce for this.

Doesn't matter to me.

> 
> Part of me thinks that servlets and PSP files should work the same way, 
> to avoid the ambiguity of file or packages.

Are we interested in integrating PSP with WSGIKit? I currenly use PSP
for templating, but Cheetah is better for that.

Eric


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Webware-devel mailing list
Webware-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to