Alex Morega ha scritto: > On 17 Mar 2010, at 13:47, Manlio Perillo wrote: > [...] >>> ========================= >>> [daemon] >>> factory = egg:PasteScript#wsgiutils >>> host = 127.0.0.1 >>> port = 8000 >>> app = my_site >>> >>> [...] >>> >> If you want this, isn't it more simple and generic to use YAML? > > Yaml buys you flexibility at the cost of readability, which might be a good > trade-off, but that's not the point. You still need a tool that reads the > configuration file and does the actual setup. > > Does the wsgix configuration loader allow for plugins, i.e. defining my own > constructors? Is it documented? >
This is a non problem. You can write your own YAML loader (maybe deriving it from the existing one), write a small middleware that use this loader and push it into the stack middleware. There is no need to support generic plugins. > I chose to base my example on Paster configuration because it already knows > about egg entry points and explicitly pointing to factory functions. > Manlio _______________________________________________ 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