def get_demo_exploration_components(demo_path):
 demo_filepath = os.path.join(feconf.SAMPLE_EXPLORATIONS_DIR, demo_path)
 if demo_filepath.endswith('yaml'):
  file_contents = utils.get_file_contents(demo_filepath)
  return (file_contents, [])
 elif os.path.isdir(demo_filepath):
  return utils.get_exploration_components_from_dir(demo_filepath)
 else:
  raise Exception(('Unrecognized file path: %s' % demo_path))

def get_demo_exploration_components ( demo_path ) : demo_filepath = os . path . join ( feconf . SAMPLE_EXPLORATIONS_DIR , demo_path ) if demo_filepath . endswith ( 'yaml' ) : file_contents = utils . get_file_contents ( demo_filepath ) return ( file_contents , [ ] ) elif os . path . isdir ( demo_filepath ) : return utils . get_exploration_components_from_dir ( demo_filepath ) else : raise Exception ( ( 'Unrecognized file path: %s' % demo_path ) )
gets the content of demo_path in the sample explorations folder .