Re: [Zope-dev] buildout + debugzope + wsgi
Hello, I did the recipe z3c.recipe.paster:debug just in case someone needs it. Friday, January 22, 2010, 2:18:35 AM, you wrote: BM On Thu, Jan 21, 2010 at 11:47 PM, Adam GROSZER agros...@gmail.com wrote: Hello, What do we use nowadays instead of the good old debugzope script with buildout and wsgi (and paster)? I somehow did not find a recipe for that. BM Both Grok BlueBream use zope.app.debug.debug to create BM a debugger from database. And then create an interactive prompt, BM like this: BMdb = zope.app.wsgi.config(zope_conf) BM debugger = Debugger.fromDatabase(db) BM # Invoke an interactive interpreter shell BM banner = (Welcome to the interactive debug prompt.\n BM The 'root' variable contains the ZODB root folder.\n BM The 'app' variable contains the Debugger, BM 'app.publish(path)' BM simulates a request.) BM __import__('code').interact(banner=banner, BM local={'debugger': debugger, BM'app': debugger, BM'root': debugger.root()}) BM But, there is slight difference between invoking the prompt in Grok BM and BlueBream. Grok has [console_scripts] entry point to create a BM custom command and BlueBream use [paste.global_paster_command] BM entry point to create sub-command for paster. BM BTW, BlueBream's idea is inspired by Pylons and code is stolen from Grok :) BM Regards, BM Baiju M -- Best regards, Adam GROSZERmailto:agros...@gmail.com -- Quote of the day: Every journalist has a novel in him, which is an excellent place for it. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] buildout + debugzope + wsgi
On 2010-1-24 11:11, Adam GROSZER wrote: Hello, I did the recipe z3c.recipe.paster:debug just in case someone needs it. How does paster shell relate to this? Wichert. -- Wichert Akkerman wich...@wiggy.net It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] buildout + debugzope + wsgi
Hello Wichert, Well, debug needs a zope.conf which is created by the paster recipe. It could be more general in the way that you specify the zope.conf instead of the app section, but I better like to have it this way. Sunday, January 24, 2010, 11:26:21 AM, you wrote: WA On 2010-1-24 11:11, Adam GROSZER wrote: Hello, I did the recipe z3c.recipe.paster:debug just in case someone needs it. WA How does paster shell relate to this? WA Wichert. -- Best regards, Adam GROSZERmailto:agros...@gmail.com -- Quote of the day: On the choice of friends, Our good or evil name depends. - John Gay ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] buildout + debugzope + wsgi
On Thu, Jan 21, 2010 at 11:47 PM, Adam GROSZER agros...@gmail.com wrote: Hello, What do we use nowadays instead of the good old debugzope script with buildout and wsgi (and paster)? I somehow did not find a recipe for that. Both Grok BlueBream use zope.app.debug.debug to create a debugger from database. And then create an interactive prompt, like this: db = zope.app.wsgi.config(zope_conf) debugger = Debugger.fromDatabase(db) # Invoke an interactive interpreter shell banner = (Welcome to the interactive debug prompt.\n The 'root' variable contains the ZODB root folder.\n The 'app' variable contains the Debugger, 'app.publish(path)' simulates a request.) __import__('code').interact(banner=banner, local={'debugger': debugger, 'app': debugger, 'root': debugger.root()}) But, there is slight difference between invoking the prompt in Grok and BlueBream. Grok has [console_scripts] entry point to create a custom command and BlueBream use [paste.global_paster_command] entry point to create sub-command for paster. BTW, BlueBream's idea is inspired by Pylons and code is stolen from Grok :) Regards, Baiju M ___ Zope-Dev maillist - Zope-Dev@zope.org https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )