parameters: (src)
return_statement: return mnames, directors
docstring: 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.)
docstring_summary: 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.)
docstring_tokens: 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 . )
function: def _find_modules(src):
      """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.)"""
      directors = 0
      mnames = []
      try:
          with open(src) as f:
              data = f.read()
          matches = _reModule.findall(data)
      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 'directors' in m[0]
      return mnames, directors
function_tokens: def _find_modules ( src ) : directors = 0 mnames = [ ] try : with open ( src ) as f : data = f . read ( ) matches = _reModule . findall ( data ) 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 'directors' in m [ 0 ] return mnames , directors