[Zope] Python -> ZopePython cheat sheet?

Skip Montanaro skip@pobox.com
Tue, 5 Nov 2002 11:17:19 -0600


    >> Is there some way I can make dir() and type() available to scripts
    >> for development purposes and make sys importable once again?

Thanks for the external method tutorial.  Worked like a charm.

    Ausum> As Chris said, you need an external method (due to security
    Ausum> concerns). 

But why can't Zope let me decide what my security tradeoffs are?  It's fine
that I can't execute any of

    dir(foo)
    type(foo)
    foo.__class__

by default, but why can't there be some simple way to say, "I'm debugging
and I know what the risks are.  Give me an interpreter that isn't crippled."
Adding dir() and type() back in were trivial edits, but making foo.__class__
available is more difficult than just messing with checkAttrName.
(Thankfully, an external method worked here.)

-- 
Skip Montanaro - skip@pobox.com
http://www.mojam.com/
http://www.musi-cal.com/