Example #1
0
    if table is None:
        if args.short:
            print "Failed"
        else:
            print "---"
            print "\033[91mNot able to access data for source in archive %s\033[0m" % (
                cat)
            print "---"
        sys.exit(1)

    if args.short:
        print "OK"
        sys.exit(0)

    if len(cols) > 0:
        tab = table
        table = Table()
        for c in cols:
            table.add_column(tab.columns[c])

    if outfile:
        table.write(outfile, format='ascii', delimiter=',')

    print "---"
    print " Table retrieved:"
    table.pprint(max_width=-1)
    print "---"

    sys.exit(0)
Example #2
0
    
    if table is None:
        if args.short:
            print "Failed"
        else:
            print "---"
            print "\033[91mNot able to access data for source in archive %s\033[0m" % (cat)
            print "---"
        sys.exit(1)
    
    if args.short:
        print "OK"
        sys.exit(0)
    
    if len(cols) > 0:
        tab = table
        table = Table()
        for c in cols:
            table.add_column(tab.columns[c])
    
    if outfile:
        table.write(outfile,format='ascii',delimiter=',')
    
    print "---"
    print " Table retrieved:"    
    table.pprint(max_width=-1)
    print "---"

    sys.exit(0)