|
##############################################################################
|
|
# -*- coding: utf-8 -*-
|
|
# Project: ControlIES
|
|
# Module: Groups.py
|
|
# Purpose: Groups class
|
|
# Language: Python 2.5
|
|
# Date: 7-Feb-2011.
|
|
# Ver: 7-Feb-2011.
|
|
# Author: Manuel Mora Gordillo
|
|
# Francisco Mendez Palma
|
|
# Copyright: 2011 - Manuel Mora Gordillo <manuito @no-spam@ gmail.com>
|
|
# 2011 - Francisco Mendez Palma <fmendezpalma @no-spam@ gmail.com>
|
|
#
|
|
# ControlIES is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
# ControlIES is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with ControlIES. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
##############################################################################
|
|
|
|
def cmpLists(list1, list2):
|
|
|
|
onlyInList1 = set(list1).difference(list2)
|
|
onlyInList2 = set(list2).difference(set(list1))
|
|
inTwoLists = set(list1) & set(list2)
|
|
|
|
return { 'onlyInList1':onlyInList1, 'onlyInList2':onlyInList2, 'inTwoLists':inTwoLists }
|