Example #1
0
def view_runs(get_data_cb, get_detail_cb):
    Viewer.get_data = staticmethod(get_data_cb)
    Viewer.get_detail = staticmethod(get_detail_cb)
    tabview.Viewer = Viewer
    tabview.view(
        [[]],
        column_width="max",
        info="Guild run comparison",
    )
Example #2
0
def tabview_cli():
    args, extra = arg_parse()
    pos_plus = [i for i in extra if i.startswith('+')]
    start_pos = start_position(args.start_pos, pos_plus)
    if args.filename != '-':
        data = args.filename
    else:
        data = fixup_stdin()
    view(data,
         enc=args.encoding,
         start_pos=start_pos,
         column_width=args.width,
         double_width=args.double_width,
         delimiter=args.delimiter,
         quoting=args.quoting,
         quote_char=args.quote_char)
Example #3
0
def preview_dataframe(df):
    global preview_tutorial
    if preview_tutorial:
        print('When in tabview:')
        print('Press the arrow keys to explore.')
        print('Press enter to inspect the cell values.')
        print('Press q to exit.')
        print('Press ? for more key-bindings in tabview.')
        print()
        print('Press Enter to continue...')
        input()
        preview_tutorial = False
    fp = tempfile.NamedTemporaryFile(mode='w+')
    df.to_csv(fp.name)
    TV.view(fp.name)
    fp.close()