'Activate the line editor'

def edit_handler(self, obj, attr):

    def load(caller):
        'Called    for    the    editor    to    load    the    buffer'
        old_value = obj.attributes.get(attr)
        if ((old_value is not None) and (not isinstance(old_value, basestring))):
            typ = type(old_value).__name__
            self.caller.msg(('|RWARNING!    Saving    this    buffer    will    overwrite    the    current    attribute    (of    type    %s)    with    a    string!|n' % typ))
            return str(old_value)
        return old_value
    def save(caller, buf):
        'Called    when    editor    saves    its    buffer.'
        obj.attributes.add(attr, buf)
        caller.msg(('Saved    Attribute    %s.' % attr))
    EvEditor(self.caller, load, save, key=('%s/%s' % (obj, attr)))
