code: def query_names(self, pat):
          
  
          for item in self.chnames.items():
              if fnmatch.fnmatchcase(item[1], pat):
                  print item
docs: pat a shell pattern. See fnmatch.fnmatchcase. Print the
          results to stdout.