• 21Nov

    We’ve been doing a lot lately with getting Zope2 Products updated to function in a Zope3 world.  There’s been many occasions where a placeless script errors out.  Ideally we’d move them all away from placeless scripts and into browser view functions, but often times they need to be debugged quickly, so that we can get the base product working in Plone 3.

    Jon ran across this situation recently, and needed to throw a debugger into the placeless script.  I had not seen this litte code snippet before, so perhaps many others have not as well.  In the __init_.py of your Product:

    from AccessControl import allow_module

    allow_module(’pdb’)

    Restart Zope, and debug placeless scripts to your heart’s content.

    Posted by David @ 12:35 pm

    Tags: , ,

   

Recent Comments