net/data/gencerts/__init__.py
def init(invoking_script_path):
  """Creates an output directory to contain all the temporary files that may be
  created, as well as determining the path for the final output. These paths
  are all based off of the name of the calling script.
  """

  global g_tmp_dir
  global g_invoking_script_path

  g_invoking_script_path = invoking_script_path

  # The scripts assume to be run from within their containing directory (paths
  # to things like "keys/" are written relative).
  expected_cwd = os.path.realpath(os.path.dirname(invoking_script_path))
  actual_cwd = os.path.realpath(os.getcwd())
  if actual_cwd != expected_cwd:
    sys.stderr.write(
        ('Your current working directory must be that containing the python '
         'scripts:\n%s\nas the script may reference paths relative to this\n')
        % (expected_cwd))
    sys.exit(1)

  # Use an output directory that is a sibling of the invoking script.
  g_tmp_dir = 'out'

  # Ensure the output directory exists and is empty.
  sys.stdout.write('Creating output directory: %s\n' % (g_tmp_dir))
  shutil.rmtree(g_tmp_dir, True)
  os.makedirs(g_tmp_dir)
Creates an output directory to contain all the temporary files that may be
  created, as well as determining the path for the final output. These paths
  are all based off of the name of the calling script.
  
Creates an output directory to contain all the temporary files that may be
created, as well as determining the path for the final output. These paths
are all based off of the name of the calling script.
Creates an output directory to contain all the temporary files that may be created as well as determining the path for the final output . These paths are all based off of the name of the calling script .
def init(invoking_script_path):
  global g_tmp_dir
  global g_invoking_script_path
  g_invoking_script_path = invoking_script_path
  expected_cwd = os.path.realpath(os.path.dirname(invoking_script_path))
  actual_cwd = os.path.realpath(os.getcwd())
  if actual_cwd != expected_cwd:
    sys.stderr.write(
        ('Your current working directory must be that containing the python '
         'scripts:\n%s\nas the script may reference paths relative to this\n')
        % (expected_cwd))
    sys.exit(1)
  g_tmp_dir = 'out'
  sys.stdout.write('Creating output directory: %s\n' % (g_tmp_dir))
  shutil.rmtree(g_tmp_dir, True)
  os.makedirs(g_tmp_dir)
def init ( invoking_script_path ) : global g_tmp_dir global g_invoking_script_path g_invoking_script_path = invoking_script_path expected_cwd = os . path . realpath ( os . path . dirname ( invoking_script_path ) ) actual_cwd = os . path . realpath ( os . getcwd ( ) ) if actual_cwd != expected_cwd : sys . stderr . write ( ( 'Your current working directory must be that containing the python ' 'scripts:\n%s\nas the script may reference paths relative to this\n' ) % ( expected_cwd ) ) sys . exit ( 1 ) g_tmp_dir = 'out' sys . stdout . write ( 'Creating output directory: %s\n' % ( g_tmp_dir ) ) shutil . rmtree ( g_tmp_dir , True ) os . makedirs ( g_tmp_dir )
Creates an output directory to contain all the temporary files that may be
created, as well as determining the path for the final output.
Creates an output directory to contain all the temporary files that may be created as well as determining the path for the final output .
"""Creates an output directory to contain all the temporary files that may be
  created, as well as determining the path for the final output. These paths
  are all based off of the name of the calling script.
  """ # The scripts assume to be run from within their containing directory (paths # to things like "keys/" are written relative). # Use an output directory that is a sibling of the invoking script. # Ensure the output directory exists and is empty.
invoking_script_path