For code:
#!/usr/bin/python src = \"\"\" print \'!!!\' import os \"\"\" obj = compile(src, \'\', \'exec\') eval(obj, {\'__builtins__\': False})
print works because you specified 'exec' to the compile function call.
'exec'
compile