On Sat, Jun 11, 2011 at 3:36 PM, Danny Navarro <[email protected]> wrote:
> I see Pyramid as just an application (a WSGI app) that just takes > requests and returns responses. The rest of Pyramid functionality is > to configure the application in the way it processes the requests and > returns the responses. Yes, I see your point. And I agree; I try and configure my apps this way, with most code not inside of view-callables, but called *from* view callables; I hook my code into the events corresponding to requests and responses; I like this way of thinking, and in principle, it would be easier to code and debug, since you can just fire off these bits of code from an interpeter or tests. Needing to have a web request means that I'm stuck talking through a web browser rather than ipython or something nice like WingIDE, which is frustrating. > What other things you have mind where you think you it's awkward to > use a request? > Of course I know I can hook into ZODB (or whatever) alone, but there are aspects of the pyramid app that I might need, for example, the settings to determine where the ZODB is (or where ZEO is). One can't grab the configuration without being inside of request either... except that I expect one can, I just don't know how. I suppose I can make my own plumbing to make this happen, but that seems strange; pyramid has these tools to find, open, expose a ZODB, including transactions, retry, etc... I'd rather just tie into that. I suppose if the "right way" to work is to always have a request or a response, I'll just have to get into the habit of using testing-like stubs... ? Thanks, Danny. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
