rexec and sys.exit()

Davide Alberani alberanid at bigfoot.togli.questo.com
Mon Apr 16 11:41:54 EDT 2001


Robin Thomas <robin.thomas at starmedia.net> wrote:
>
>>class MyRE(rexec.RExec):
>>     def r_eval(self, code):
>>         return eval(code, my_dict)
> 
> MyRE.ok_sys_names = () # or some names you wish to allow

It works, thank you.

Oh my god, it was a syntax error!
Obviously I tried:

  class MyRE(rexec.RExec):
      ok_sys_name = ()
      def r_eval(self, code):
          ...

But I wrote "ok_sys_name" instead of "ok_sys_names"... :-|

-- 
http://digilander.iol.it/alberanid/



More information about the Python-list mailing list