code: def find_pattern(search_base, pattern='*.rpm'):
      
      # Stolen from http://rosettacode.org/wiki/Walk_a_directory/Recursively#Python
      if (not os.path.isdir(search_base)) and os.path.exists(search_base):
          # Adapt the algorithm to gracefully handle non-directory search paths
          yield search_base
      else:
          for root, dirs, files in os.walk(search_base):
              for filename in fnmatch.filter(files, pattern):
                  yield os.path.join(root, filename)
docs: `search_base` - The directory to begin walking down.
      `pattern` - File pattern to match for.
  
      This is a generator which yields the full path to files (one at a
      time) which match the given glob (`pattern`).