def cbPickMailbox(result, proto, mboxes):
 mbox = mboxes[(int((result or '1')) - 1)]
 return proto.examine(mbox).addCallback(cbExamineMbox, proto)

def cbPickMailbox ( result , proto , mboxes ) : mbox = mboxes [ ( int ( ( result or '1' ) ) - 1 ) ] return proto . examine ( mbox ) . addCallback ( cbExamineMbox , proto )
when the user selects a mailbox .