def _findNewest():
 path = os.path.expanduser((('~/Library/Application Support/Skype/' + getUserName()) + '/main.db'))
 with contextlib.closing(sqlite3.connect(path).cursor()) as db:
  db.execute('SELECT skypename,fullname,displayname FROM Contacts WHERE skypename IN (SELECT identity FROM Conversations ORDER BY last_activity_timestamp DESC LIMIT 5)')
  return _listFriends(db.fetchall(), ': ', True, True)

def _findNewest ( ) : path = os . path . expanduser ( ( ( '~/Library/Application Support/Skype/' + getUserName ( ) ) + '/main.db' ) ) with contextlib . closing ( sqlite3 . connect ( path ) . cursor ( ) ) as db : db . execute ( 'SELECT skypename,fullname,displayname FROM Contacts WHERE skypename IN (SELECT identity FROM Conversations ORDER BY last_activity_timestamp DESC LIMIT 5)' ) return _listFriends ( db . fetchall ( ) , ': ' , True , True )
get newest messages from skype database :return: list of tuples of friends .