If anyone is interested I end up using rexec kinda class with only difference that i am using native __builtin__ and resetting __import__ hook to and from local r_import implementation before and after I am executing code in my environment. Gennadiy