On 7/11/06, <b class="gmail_sendername">Phillip J. Eby</b> &lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
At 10:56 AM 7/11/2006 -0700, Brett Cannon wrote:<br>&gt;On 7/10/06, Talin &lt;&lt;mailto:<a href="mailto:talin@acm.org">talin@acm.org</a>&gt;<a href="mailto:talin@acm.org">talin@acm.org</a>&gt; wrote:<br>&gt;&gt;(Although, I've often wished for Python to have a variant of __call__
<br>&gt;&gt;that could be used to override individual methods, i.e.:<br>&gt;&gt;<br>&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;__call_method__( self, methodname, *args )<br><br>As with so many other things in this discussion, this was already invented
<br>by the Zope folks just shy of a decade ago.&nbsp;&nbsp;;-)&nbsp;&nbsp;__call_method__ is<br>actually a feature of ExtensionClasses, although you can of course<br>implement it yourself now atop new-style classes.<br><br>For other things that Zope has already done in the area of restricted
<br>execution R&amp;D, see:<br><br><a href="http://svn.zope.org/Zope3/trunk/src/zope/security/untrustedinterpreter.txt?view=auto">http://svn.zope.org/Zope3/trunk/src/zope/security/untrustedinterpreter.txt?view=auto</a><br>
<br>The surrounding directory has other documents regarding their approach.<br><br>I haven't been following this discussion closely, but a lot of the things<br>mentioned in this thread seem to have a lot in common with stuff the Zope
<br>folks have had in production for &quot;untrusted&quot; Python execution for some time<br>now, working with current versions of Python.&nbsp;&nbsp;It would be a shame to<br>reinvent all the same wheels, especially since their code is nicely
<br>documented complete with extensive doctests and explanations of the approach.</blockquote><div><br>Taking a proxy approach is just being discussed; it has not been decided as the proper solution.&nbsp; I have been considering just preventing direct 'file' access and using open() to act as a delegate for opening files.&nbsp; That approach has nothing to do with proxies.
<br><br>-Brett<br></div><br></div>