tools/generate_stubs/generate_stubs.py
def CreateWindowsDefForSigFiles(sig_files, out_dir, module_name):
  """For all signature files, create a single Windows def file.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated def goes.
    module_name: Name of the output DLL or LIB which will link in the def file.
  """
  signatures = []
  for input_path in sig_files:
    infile = open(input_path, 'r')
    try:
      signatures += ParseSignatures(infile)
    finally:
      infile.close()

  def_file_path = os.path.join(
      out_dir,
      os.path.splitext(os.path.basename(module_name))[0] + '.def')
  outfile = open(def_file_path, 'w')

  try:
    WriteWindowsDefFile(module_name, signatures, outfile)
  finally:
    outfile.close()
For all signature files, create a single Windows def file.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated def goes.
    module_name: Name of the output DLL or LIB which will link in the def file.
  
For all signature files, create a single Windows def file.
For all signature files create a single Windows def file .
def CreateWindowsDefForSigFiles(sig_files, out_dir, module_name):
  signatures = []
  for input_path in sig_files:
    infile = open(input_path, 'r')
    try:
      signatures += ParseSignatures(infile)
    finally:
      infile.close()
  def_file_path = os.path.join(
      out_dir,
      os.path.splitext(os.path.basename(module_name))[0] + '.def')
  outfile = open(def_file_path, 'w')
  try:
    WriteWindowsDefFile(module_name, signatures, outfile)
  finally:
    outfile.close()
def CreateWindowsDefForSigFiles ( sig_files , out_dir , module_name ) : signatures = [ ] for input_path in sig_files : infile = open ( input_path , 'r' ) try : signatures += ParseSignatures ( infile ) finally : infile . close ( ) def_file_path = os . path . join ( out_dir , os . path . splitext ( os . path . basename ( module_name ) ) [ 0 ] + '.def' ) outfile = open ( def_file_path , 'w' ) try : WriteWindowsDefFile ( module_name , signatures , outfile ) finally : outfile . close ( )
For all signature files, create a single Windows def file.
For all signature files create a single Windows def file .
"""For all signature files, create a single Windows def file.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated def goes.
    module_name: Name of the output DLL or LIB which will link in the def file.
  """
sig_files
Array of strings with the paths to each signature file.
Array of strings with the paths to each signature file .
out_dir
String holding path to directory where the generated def goes.
String holding path to directory where the generated def goes .
module_name
Name of the output DLL or LIB which will link in the def file.
Name of the output DLL or LIB which will link in the def file .