@responder(pattern="^!(?P<source>.+)", form="!<code>", help="Execute some python code")
def python(conversation, source):
    from droned.entity import namespace
    source = source.strip()
    try:
        code = compile(source, '<jabber>', 'eval')
    except:
        try:
            code = compile(source, '<jabber>', 'single')
        except:
            msg = "I couldn't compile your code.\n%s" % traceback.format_exc()
            conversation.say(msg, useHTML=False)
            return
    try:
        result = eval(code, namespace)
    except:
        result = traceback.format_exc()
    conversation.say(str(result), useHTML=False)
dataset/ETHPy150Open OrbitzWorldwide/droned/droned/lib/droned/responders/core.py/python/original