code: def find_threads_by_name(self, name, bExactMatch = True):
          
          found_threads = list()
  
          # Find threads with no name.
          if name is None:
              for aThread in self.iter_threads():
                  if aThread.get_name() is None:
                      found_threads.append(aThread)
  
          # Find threads matching the given name exactly.
          elif bExactMatch:
              for aThread in self.iter_threads():
                  if aThread.get_name() == name:
                      found_threads.append(aThread)
  
          # Find threads whose names match the given substring.
          else:
              for aThread in self.iter_threads():
                  t_name = aThread.get_name()
                  if t_name is not None and name in t_name:
                      found_threads.append(aThread)
  
          return found_threads
docs: Find threads by name, using different search methods.
  
          @type  name: str, None
          @param name: Name to look for. Use C{None} to find nameless threads.
  
          @type  bExactMatch: bool
          @param bExactMatch: C{True} if the name must be
              B{exactly} as given, C{False} if the name can be
              loosely matched.
  
              This parameter is ignored when C{name} is C{None}.
  
          @rtype:  list( L{Thread} )
          @return: All threads matching the given name.