code: def _find_modules(src):
      
      directors = 0
      mnames = []
      try:
          matches = _reModule.findall(open(src).read())
      except IOError:
          # If the file's not yet generated, guess the module name from the file stem
          matches = []
          mnames.append(os.path.splitext(os.path.basename(src))[0])
  
      for m in matches:
          mnames.append(m[2])
          directors = directors or m[0].find('directors') >= 0
      return mnames, directors
docs: Find all modules referenced by %module lines in `src`, a SWIG .i file.
         Returns a list of all modules, and a flag set if SWIG directors have
         been requested (SWIG will generate an additional header file in this
         case.)