#NEWLINE# def run( self , func ) : #NEWLINE# #INDENT# "Run 'func' under os sandboxing" #NEWLINE# try : #NEWLINE# #INDENT# self . _copy ( self ) #NEWLINE# if _file : #NEWLINE# #INDENT# builtins . file = self . _file #NEWLINE# #UNINDENT# builtins . open = func . _open #NEWLINE# self . _active = True #NEWLINE# return func ( ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . _active = False #NEWLINE# if _file : #NEWLINE# #INDENT# builtins . file = _file #NEWLINE# #UNINDENT# builtins . open = _open #NEWLINE# self . _copy ( _os )