parameters: (path)
docstring: Get the module name, suffix, mode, and module type for a given file.
docstring_summary: Get the module name, suffix, mode, and module type for a given file.
docstring_tokens: Get the module name suffix mode and module type for a given file .
function: def getmoduleinfo(path):
      """Get the module name, suffix, mode, and module type for a given file."""
      filename = os.path.basename(path)
      suffixes = map(lambda (suffix, mode, mtype):
                     (-len(suffix), suffix, mode, mtype), imp.get_suffixes())
      suffixes.sort() # try longest suffixes first, in case they overlap
      for neglen, suffix, mode, mtype in suffixes:
          if filename[neglen:] == suffix:
              return filename[:neglen], suffix, mode, mtype
function_tokens: def getmoduleinfo ( path ) : filename = os . path . basename ( path ) suffixes = map ( lambda ( suffix , mode , mtype ) : ( - len ( suffix ) , suffix , mode , mtype ) , imp . get_suffixes ( ) ) suffixes . sort ( ) # try longest suffixes first, in case they overlap for neglen , suffix , mode , mtype in suffixes : if filename [ neglen : ] == suffix : return filename [ : neglen ] , suffix , mode , mtype