def save_environment(directory, cluster, package_source):
 environment_variables = get_trial_environment(cluster, package_source)
 environment_strings = list()
 for environment_variable in environment_variables:
  environment_strings.append('export {name}={value};\n'.format(name=environment_variable, value=shell_quote(environment_variables[environment_variable])))
 environment = ''.join(environment_strings)
 print 'The following variables describe the cluster:'
 print environment
 env_file = directory.child('environment.env')
 env_file.setContent(environment)
 print 'The variables are also saved in {}'.format(env_file.path)
 print 'Be sure to preserve the required files.'

def save_environment ( directory , cluster , package_source ) : environment_variables = get_trial_environment ( cluster , package_source ) environment_strings = list ( ) for environment_variable in environment_variables : environment_strings . append ( 'export {name}={value};\n' . format ( name = environment_variable , value = shell_quote ( environment_variables [ environment_variable ] ) ) ) environment = '' . join ( environment_strings ) print 'The following variables describe the cluster:' print environment env_file = directory . child ( 'environment.env' ) env_file . setContent ( environment ) print 'The variables are also saved in {}' . format ( env_file . path ) print 'Be sure to preserve the required files.'
report environment variables describing the cluster .