Simple Python code help to select finger effectors for only the current active character in a scene

Hi all,

I am learning python and the first script I have written is a basic one that searches the scene for the Right and Left Hand finger effectors and puts them in separate Right and Left Groups for selection purposes.

It works fine.

Now, I want to modify it so that when there are multiple characters in the scene, it will create groups only for the current active character.
As you can see from the code sample below, I have defined the current character and also received its namespace. I am stuck at the part where I go about making the code:

  1. select only those RIGHT/LEFT Hand Finger effectors for the current character
    OR
  2. search for the RIGHT/LEFT Hand Finger effectors for the current character and then select them
#Deselecting any previously selected objects in the scene
selectedModels = FBModelList()
FBGetSelectedModels(selectedModels)
for model in selectedModels:
    model.Selected = False

# Defining our Character as the currently selected one
lCharacter = FBApplication().CurrentCharacter
theNameSpace = lCharacter.LongName.split(":")
print theNameSpace

searchModelsOnly = True
searchInNamespace = False

#Searching for the Right Hand Finger Effectors in the scene and selecting them
rightfingersList = FBComponentList()
FBFindObjectsByName('RightHand*', rightfingersList, searchInNamespace, searchModelsOnly).theNameSpace
for comp in rightfingersList:
    comp.Selected = True
   
#Creating a Group 
group1 = FBGroup('RightFingers')

#Adding the selected Effectors to the group and then deselecting them
selectedModels = FBModelList()
FBGetSelectedModels(selectedModels)
for model in selectedModels:
    group1.Items.append(model)
    model.Selected = False

Any help or hint towards the right direction will be greatly appreciated!
I searched the available resources online but I seem to be missing something or probably not understanding the function, so I am kind of stuck here.

Thanks, peace!