I nailed down the problem to this.
env = {'__builtins__': {}, "date": datetime.datetime.utcnow()}
code = "date.strftime('%m %Y')"
exec code in env
Running this gives the following error.
...
exec code in env
File "<string>", line 1, in <module>
KeyError: '__import__'
Any python experts around for help?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---