Michel Pelletier wrote:
Evan, what are your ideas on a '_' like namespace where you provide some handy dandy modules? Could very much increase the usability of PythonMethods for the short term until you work out importing.
Since my objective is to make PythonMethods exactly as secure as DTML Methods, I don't want to provide *anything* that they don't. External Methods are a good way to give controlled access to additional modules like this. I plan to enable 'import' in the same way I enabled 'print', by which I mean the command will be usable, but will work differently than in standard Python code. Most likely, 'import' will be bent into a tool for accessing other objects in the ZODB hierarchy. Despite that, on my personal site, I use a teeny little Product which inserts urllib, base64, and some builtins like 'list' and 'map' into the standard namespace object. I'm the only authorized user, so it seems safe :-)