tools/generate_stubs/generate_stubs.py
def ExtractModuleName(infile_path):
  """Infers the module name from the input file path.

  The input filename is supposed to be in the form "ModuleName.sigs".
  This function splits the filename from the extension on that basename of
  the path and returns that as the module name.

  Args:
    infile_path: String holding the path to the input file.

  Returns:
    The module name as a string.
  """
  basename = os.path.basename(infile_path)

  # This loop continously removes suffixes of the filename separated by a "."
  # character.
  while 1:
    new_basename = os.path.splitext(basename)[0]
    if basename == new_basename:
      break
    else:
      basename = new_basename
  return basename
Infers the module name from the input file path.

  The input filename is supposed to be in the form "ModuleName.sigs".
  This function splits the filename from the extension on that basename of
  the path and returns that as the module name.

  Args:
    infile_path: String holding the path to the input file.

  Returns:
    The module name as a string.
  
Infers the module name from the input file path.
The input filename is supposed to be in the form "ModuleName.sigs".
This function splits the filename from the extension on that basename of
the path and returns that as the module name.
Infers the module name from the input file path . The input filename is supposed to be in the form " ModuleName . sigs " . This function splits the filename from the extension on that basename of the path and returns that as the module name .
def ExtractModuleName(infile_path):
  basename = os.path.basename(infile_path)
  while 1:
    new_basename = os.path.splitext(basename)[0]
    if basename == new_basename:
      break
    else:
      basename = new_basename
  return basename
def ExtractModuleName ( infile_path ) : basename = os . path . basename ( infile_path ) while 1 : new_basename = os . path . splitext ( basename ) [ 0 ] if basename == new_basename : break else : basename = new_basename return basename
Infers the module name from the input file path.
Infers the module name from the input file path .
"""Infers the module name from the input file path.

  The input filename is supposed to be in the form "ModuleName.sigs".
  This function splits the filename from the extension on that basename of
  the path and returns that as the module name.

  Args:
    infile_path: String holding the path to the input file.

  Returns:
    The module name as a string.
  """ # This loop continously removes suffixes of the filename separated by a "." # character.
The module name as a string.
The module name as a string .
infile_path
String holding the path to the input file.
String holding the path to the input file .