'Process the session_start event.
Typical actions for the session_start event are
requesting the roster and broadcasting an initial
presence stanza.
Arguments:
event -- An empty dictionary. The session_start
event does not provide any additional
data.'

def start(self, event):

    try:
        self.get_roster()
    except IqError as err:
        print ('Error:    %s' % err.iq['error']['condition'])
    except IqTimeout:
        print 'Error:    Request    timed    out'
    self.send_presence()
    print 'Waiting    for    presence    updates...\n'
    self.presences_received.wait(5)
    print ('Roster    for    %s' % self.boundjid.bare)
    groups = self.client_roster.groups()
    for group in groups:
        print ('\n%s' % group)
        print ('-' * 72)
        for jid in groups[group]:
            sub = self.client_roster[jid]['subscription']
            name = self.client_roster[jid]['name']
            if self.client_roster[jid]['name']:
                print ('    %s    (%s)    [%s]' % (name, jid, sub))
            else:
                print ('    %s    [%s]' % (jid, sub))
            connections = self.client_roster.presence(jid)
            for (res, pres) in connections.items():
                show = 'available'
                if pres['show']:
                    show = pres['show']
                print ('            -    %s    (%s)' % (res, show))
                if pres['status']:
                    print ('                            %s' % pres['status'])
    self.disconnect()
