re module in restrictricted execution

Jeremy S Lowery jslowery at hotmail.com
Sat Jul 6 01:25:41 EDT 2002


I've done a little customization on a subclass of RExec and have allowed the
re module to be imported. I just wanted to drop a tip off that if you want
RExec's to use the re module, you have to add hexversion to the ok sys
names, like.

class MyRExec(RExec):
    ok_builtin_modules = RExec.ok_builtin_modules  + ('symbol', 'types',
'string', 're')
    ok_sys_names = RExec.ok_sys_names + ('hexversion',)

Jeremy S Lowery







More information about the Python-list mailing list