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("running {0}".format(self.filename))
      with disable_mpld3():
          import matplotlib.pyplot as plt
  
          plt.close("all")
          my_globals = {"pl": plt, "plt": plt}
          exec(
              compile(
                  open(self.filename, "rb").read(),
                  self.filename,
                  "exec",
              ),
              my_globals,
          )
  
      fig = plt.gcf()
      self.html = mpld3.fig_to_html(fig)
      thumbfile = os.path.join(self.target_dir, self.pngfilename)
      fig.savefig(thumbfile)
      create_thumbnail(thumbfile, thumbfile)
  
imports: import sys
  import os
  import glob
  import token
  import tokenize
  import shutil
  import json
  import matplotlib
  import mpld3
  from matplotlib import image
  from matplotlib.figure import Figure
label_desc: Use image node_id 13 for calling the ExampleGenerator obj's underlying member method code with example usage: obj.exec_file() without return types