Beispiel #1
0
def test_latex():
    fd = open(os.path.join(base, 'main.tex'), 'w')
    try:
        fd.write(TEMPLATE)
    finally:
        fd.close()
    fd = open(os.path.join(base, 'config.cfg'), 'w')
    try:
        fd.write('[paths]\n')
    finally:
        fd.close()
    sre(base)
    return 0
Beispiel #2
0
    sidebarh = Bag(df, md=lm_sidebarh, stype='graph')
    sidebar = Bag(df, md=lm_sidebar, stype='graph')
    barh = Bag(df, md=lm_barh, stype='graph')
    scat = Bag(df_sc, md=lm_sc, stype='graph')

    base = '/tmp/test/'
    if not os.path.isdir(base):
        os.makedirs(base)

    plot.save(os.path.join(base, "plot.pickle"))
    bar.save(os.path.join(base, "bar.pickle"))
    barh.save(os.path.join(base, "barh.pickle"))
    sidebar.save(os.path.join(base, "sidebar.pickle"))
    sidebarh.save(os.path.join(base, "sidebarh.pickle"))
    scat.save(os.path.join(base, "scatter.pickle"))

    fd = open(os.path.join(base, 'main.tex'), 'w')
    try:
        fd.write(TEMPLATE)
    finally:
        fd.close()

    # # Generate config file (not mandatory)
    # fd = open(os.path.join(base, 'config.cfg'), 'w')
    # try:
    #     fd.write('[paths]\n')
    # finally:
    #     fd.close()

    sre(base)