I want to be able to execute arbitrary expressions but have their context be
within my class.  The end result is that RT test should be printed and not
global test

def test():
 print "global test"

class RT:
 def test(_self_):
  print 'RT test'
 def Evaluate(_self_,code):
  eval(code)


test()
a.test()
a=RT()
a.Evaluate('test()')

Michael Stephens

Electrical Engineering Graduate Student
University of Wyoming
[EMAIL PROTECTED] or [EMAIL PROTECTED]
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to