def generate_example_rst(app):
 example_dir = os.path.abspath(os.path.join(app.builder.srcdir, '..', '..', 'examples'))
 generated_dir = os.path.abspath(os.path.join(app.builder.srcdir, 'examples'))
 try:
  plot_gallery = eval(app.builder.config.plot_gallery)
 except TypeError:
  plot_gallery = bool(app.builder.config.plot_gallery)
 if (not os.path.exists(example_dir)):
  os.makedirs(example_dir)
 if (not os.path.exists(generated_dir)):
  os.makedirs(generated_dir)
 seen_backrefs = set()
 generate_dir_rst('.', example_dir, generated_dir, plot_gallery, seen_backrefs)

def generate_example_rst ( app ) : example_dir = os . path . abspath ( os . path . join ( app . builder . srcdir , '..' , '..' , 'examples' ) ) generated_dir = os . path . abspath ( os . path . join ( app . builder . srcdir , 'examples' ) ) try : plot_gallery = eval ( app . builder . config . plot_gallery ) except TypeError : plot_gallery = bool ( app . builder . config . plot_gallery ) if ( not os . path . exists ( example_dir ) ) : os . makedirs ( example_dir ) if ( not os . path . exists ( generated_dir ) ) : os . makedirs ( generated_dir ) seen_backrefs = set ( ) generate_dir_rst ( '.' , example_dir , generated_dir , plot_gallery , seen_backrefs )
generate the list of examples .