<%
    import sys, os, glob
%>

<div class="code">
	${f"{method} {args}"}
</div>

<div class="divrow">
    % if not skip_input:
        <div class="divcolumn">
            <b>Input</b>
            ${ plotter.table(id=table_name, text=True, header=False, row_names=False, styled='bs', attrib = {'class' : 'table table-striped table-bordered table-compact'})}
        </div>
    %endif

    %for supp_title, supp_table_id in supp_tables:
        <div class="divcolumn">
            <b>${supp_title}</b>
            ${ plotter.table(id=supp_table_id, text=True, header=False, row_names=False, styled='bs', 
                attrib = {'class' : 'table table-striped table-bordered table-compact'})}
        </div>
    %endfor

    <%
        if out_type != 'std' and out_type != 'out':
            all_outputs = []
            for outpath in out_type.split(","): all_outputs += glob.glob(outpath.strip())
            res_tabname = [ os.path.basename(outpath) for outpath in all_outputs ]
            outdata = all_outputs # We create outdata var to no overwrite out_type var and hit a mako bug con variable scop that tells that out_type is not accesible
        else:
            res_tabname = [f'{method}-{args.replace(",", "_")}']
            outdata = out_type

    	plotter.execute_command(args, method, out=outdata, string2table = True, module = library, name = res_tabname )
    %>

    %for table_id in res_tabname:
        <% table_title = 'Output' if len(res_tabname) == 1 else table_id %>
        %if plotter.hash_vars.get(table_id):
            <div class="divcolumn">
                <b>${table_title}</b>
                ${ plotter.table(id=table_id, text=True, header=False, row_names=False, 
                styled='bs', attrib = {'class' : 'table table-striped table-bordered table-compact'} )}
            </div>
        %endif
    %endfor
</div>