def extract_env_vars_from_xml(xml_file):
 custom_vars = {}
 tree = ElementTree.parse(xml_file)
 root = tree.getroot()
 for child in root:
  if (not child.tag.endswith('env-variables')):
   continue
  for env_var in child:
   var_dict = env_var.attrib
   custom_vars[var_dict['name']] = var_dict['value']
 return custom_vars

def extract_env_vars_from_xml ( xml_file ) : custom_vars = { } tree = ElementTree . parse ( xml_file ) root = tree . getroot ( ) for child in root : if ( not child . tag . endswith ( 'env-variables' ) ) : continue for env_var in child : var_dict = env_var . attrib custom_vars [ var_dict [ 'name' ] ] = var_dict [ 'value' ] return custom_vars
returns any custom environment variables defined in appengine-web .