def latex_to_png(s, encode=False):
    from matplotlib import mathtext
    
    mt = mathtext.MathTextParser('bitmap')
    f = StringIO()
    mt.to_png(f, s, fontsize=12)
    bin_data = f.getvalue()
    if encode:
        bin_data = encodestring(bin_data)
    return bin_data
Return the 'output' (full output path) to a bundle output directory.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/lib/latextools.py/latex_to_png--crossover with--dataset/ETHPy150Open adobe/brackets-shell/gyp/pylib/gyp/generator/ninja.py/NinjaWriter.ComputeMacBundleOutput