I had some very interesting results with this code to do what is asked:<br><br>for key in globals().keys():<br> del globals()[key]<br>for key in locals().keys():<br> del locals()[key]<br><br>It might be better to reverse the two steps, I didn't give it much thought. Anyway, when this is done, all of the builtins spill into globals and locals (since __builtin__ was deleted). I thought that was interesting.<br>
<br>It did have the effect that is asked for, although there may be more unintended consequences. Also if any objects are attached to any of the builtins I expect they will still be around.<br>