I want to be able to execute arbitrary expressions but have their context be within my class.&nbsp; The end result is that RT test should be printed and not global test<br><br>def test():<br>&nbsp;print &quot;global test&quot;<br><br>
class RT:<br>&nbsp;def test(_self_):<br>&nbsp; print &#39;RT test&#39;<br>&nbsp;def Evaluate(_self_,code):<br>&nbsp; eval(code) <br><br><br>test()<br>a.test()<br>a=RT()<br>a.Evaluate(&#39;test()&#39;)<br clear="all"><br>Michael Stephens<br><br>
Electrical Engineering Graduate Student<br>University of Wyoming<br><a href="mailto:falcon@uwyo.edu">falcon@uwyo.edu</a> or <a href="mailto:89iroc@gmail.com">89iroc@gmail.com</a>