def generate_all_example_rst(app):
 input_dir = os.path.abspath(app.builder.srcdir)
 try:
  plot_gallery = eval(app.builder.config.plot_gallery)
 except TypeError:
  plot_gallery = bool(app.builder.config.plot_gallery)
 for (dir_path, dir_names, file_names) in os.walk(input_dir):
  if (('build' in dir_path.split(os.sep)) or ('auto_examples' in dir_path.split(os.sep))):
   continue
  if ('examples' in dir_names):
   generate_example_rst(os.path.join(dir_path, 'examples'), os.path.join(dir_path, 'auto_examples'), plot_gallery=plot_gallery)

def generate_all_example_rst ( app ) : input_dir = os . path . abspath ( app . builder . srcdir ) try : plot_gallery = eval ( app . builder . config . plot_gallery ) except TypeError : plot_gallery = bool ( app . builder . config . plot_gallery ) for ( dir_path , dir_names , file_names ) in os . walk ( input_dir ) : if ( ( 'build' in dir_path . split ( os . sep ) ) or ( 'auto_examples' in dir_path . split ( os . sep ) ) ) : continue if ( 'examples' in dir_names ) : generate_example_rst ( os . path . join ( dir_path , 'examples' ) , os . path . join ( dir_path , 'auto_examples' ) , plot_gallery = plot_gallery )
generate the list of examples .