'Run.'

def Run(self, args):

    time_start = time.time()
    class StdOutHook(object, ):
        def __init__(self, buf):
            self.buf = buf
        def write(self, text):
            self.buf.write(text)
    args.python_code.Verify(config.CONFIG['Client.executable_signing_public_key'])
    logging.debug('exec    for    python    code    %s', args.python_code.data[0:100])
    context = globals().copy()
    context['py_args'] = args.py_args.ToDict()
    context['magic_return_str'] = ''
    context['Progress'] = self.Progress
    stdout = StringIO.StringIO()
    with utils.Stubber(sys, 'stdout', StdOutHook(stdout)):
        exec args.python_code.data in context
    stdout_output = stdout.getvalue()
    magic_str_output = context.get('magic_return_str')
    if (stdout_output and magic_str_output):
        output = ('Stdout:    %s\nMagic    Str:%s\n' % (stdout_output, magic_str_output))
    else:
        output = (stdout_output or magic_str_output)
    time_used = (time.time() - time_start)
    self.SendReply(rdf_client.ExecutePythonResponse(time_used=int((1000000.0 * time_used)), return_val=utils.SmartStr(output)))
