class_docstr: Tools for generating an example page from a file
class_docstr_tok: ["Tools","for","generating","an","example","page","from","a","file"]
code: def exec_file(self):
      print(f"running {self.filename}")
  
      plt.close("all")
      my_globals = {"pl": plt, "plt": plt}
      execfile(self.filename, my_globals)
  
      fig = plt.gcf()
      fig.canvas.draw()
      pngfile = op.join(self.target_dir, self.pngfilename)
      thumbfile = op.join("example_thumbs", self.thumbfilename)
      self.html = f"<img src=../{self.pngfilename}>"
      fig.savefig(pngfile, dpi=75, bbox_inches="tight")
  
      cx, cy = self.thumbloc
      create_thumbnail(pngfile, thumbfile, cx=cx, cy=cy)
  
imports: import os
  import os.path
  import re
  import glob
  import token
  import tokenize
  import shutil
  import warnings
  import matplotlib
  import matplotlib.pyplot
label_desc: Use image node_id 15 for calling the ExampleGenerator obj's underlying member method code with example usage: obj.exec_file() without return types