Esempio n. 1
0
def copy_lists(target_name, from_lists):
	"""Copies the members of the twi-lists in 'from_lists' to twi-list given by argument 'target_name' """
	
	# Make a list with "target_name" as member # TEMP
	target_list = list()
	target_list.append(target_name)
	
	# Get sets of people already in list (targetname) and in the set of lists to be copied from(from_lists)
	existing_members = get_all_list_members(target_list)
	to_be_members = get_all_list_members(from_lists)
	
	# Make final list of people to be newly added to list
	# SET DIFFERENCE
	to_be_members.difference(existing_members)
	
	# POST to twitter
	OauthHandler.addlistmembers(target_name, list(to_be_members))
	
	del target_list, existing_members, to_be_members	
	return True
Esempio n. 2
0
def copy_lists(target_name, from_lists):
    """Copies the members of the twi-lists in 'from_lists' to twi-list given by argument 'target_name' """

    # Make a list with "target_name" as member # TEMP
    target_list = list()
    target_list.append(target_name)

    # Get sets of people already in list (targetname) and in the set of lists to be copied from(from_lists)
    existing_members = get_all_list_members(target_list)
    to_be_members = get_all_list_members(from_lists)

    # Make final list of people to be newly added to list
    # SET DIFFERENCE
    to_be_members.difference(existing_members)

    # POST to twitter
    OauthHandler.addlistmembers(target_name, list(to_be_members))

    del target_list, existing_members, to_be_members
    return True
Esempio n. 3
0
def copy_members(target_name, member_list):
	"""Copies the members from 'member_list' to twi-list given by argument 'target_name' """
	OauthHandler.addlistmembers(target_name, member_list)
Esempio n. 4
0
def copy_members(target_name, member_list):
    """Copies the members from 'member_list' to twi-list given by argument 'target_name' """
    OauthHandler.addlistmembers(target_name, member_list)