<br><br><div class="gmail_quote">On Fri, Apr 3, 2009 at 12:21 PM, Anand Chitipothu <span dir="ltr"><<a href="mailto:anandology@gmail.com">anandology@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> I have a basic doubt - why do you want to set a module as core<br>
> as __builtins__ to {} in your code ? If you can answer that<br>
> reasonably, it makes sense to investigate this or raise a bug.<br>
> Otherwise, I don't think it is good coding.<br>
<br>
</div>It is used in web.py templating engine to restrict the available<br>
builtins to templates.</blockquote><div><br>Â Â web.py is a great framework, but this is bad coding for sure.<br>Â I guess you need to do some hack like,<br>Â <br>Â Â Â oldbuiltins=__builtins__<br>Â Â Â __builtins__ = {}<br><br>
  Then before calling code that breaks,<br>   __builtins__ = oldbuiltins<br>  <br>    <call breaking code here><br><br> But this is damn ugly and if it were me, I would investigate other<br> options whch doesn't force me to put __builtins__ to {} in my<br>
 code. I don't know details enough to advise you on this<br> specifically in this case.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<div><div></div><div class="h5">_______________________________________________<br>
BangPypers mailing list<br>
<a href="mailto:BangPypers@python.org">BangPypers@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/bangpypers" target="_blank">http://mail.python.org/mailman/listinfo/bangpypers</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-Anand<br><br><br><br>