class_docstr: Class to execute plotting files, and extract the mpl and mpld3 figures.
class_docstr_tok: ["Class","to","execute","plotting","files",",","and","extract","the","mpl","and","mpld3","figures","."]
code: def __init__(self, filename, execute=True, pngdir="_pngs"):
      self.filename = filename
      if execute:
          self.execute_file()
      if not os.path.exists(pngdir):
          os.makedirs(pngdir)
      basename = os.path.splitext(os.path.basename(filename))[0]
      self.pngfmt = os.path.join(pngdir, basename + "_{0:2d}.png")
  
imports: import os
  import glob
  import sys
  import gc
  import traceback
  import itertools
  import json
  import contextlib
  import matplotlib
  import matplotlib.pyplot
  import mpld3
  from mpld3 import urls
  from mpld3._display import NumpyEncoder
  from mpld3.mpld3renderer import MPLD3Renderer
  from mpld3.mplexporter import Exporter
label_desc: Use image node_id 1 to create a new ExecFile object from inherited base classes: object with example: obj = ExecFile(filename, execute, pngdir)