Skip to content
This repository was archived by the owner on Dec 7, 2021. It is now read-only.
This repository was archived by the owner on Dec 7, 2021. It is now read-only.

Table show error #57

@XuCcc

Description

@XuCcc

My Codes:

from terminaltables import SingleTable
...
    def show(self, nametuple):
        datas = []
        datas.append(("id",) + nametuple._fields[:-1])
        for i, data in enumerate(self.data):
            datas.append((i,) + data[:-1])
        print SingleTable(datas).table
.                                                                                                                                                              [ 19%]
test/test_dataBase.py .s..┌────┬────────────┬─────────┬─────────┐
│ id │ ip         │ web     │ pwn     │
├────┼────────────┼─────────┼─────────┤
│ 0  │ 10.10.10.1 │ 8080 80 │ 9090 90 │
│ 1  │ 10.10.10.2 │ 8080 80 │ 9090 90 │
│ 2  │ 10.10.10.3 │ 8080 80 │ 9090 90 │
│ 3  │ 10.10.10.4 │ 8080 80 │ 9090 90 │
│ 4  │ 10.10.10.5 │ 8080 80 │ 9090 90 │
└────┴────────────┴─────────┴─────────┘

it workds ok,but after i import pwntools

from terminaltables import SingleTable
...
from pwn import *
...
    def show(self, nametuple):
        datas = []
        datas.append(("id",) + nametuple._fields[:-1])
        for i, data in enumerate(self.data):
            datas.append((i,) + data[:-1])
        print SingleTable(datas).table
test/test_dataBase.py .s..lqqqqwqqqqqqqqqqqqwqqqqqqqqqwqqqqqqqqqk
x id x ip         x web     x pwn     x
tqqqqnqqqqqqqqqqqqnqqqqqqqqqnqqqqqqqqqu
x 0  x 10.10.10.1 x 8080 80 x 9090 90 x
x 1  x 10.10.10.2 x 8080 80 x 9090 90 x
x 2  x 10.10.10.3 x 8080 80 x 9090 90 x
x 3  x 10.10.10.4 x 8080 80 x 9090 90 x
x 4  x 10.10.10.5 x 8080 80 x 9090 90 x
mqqqqvqqqqqqqqqqqqvqqqqqqqqqvqqqqqqqqqj
.lqqqqwqqqqqqqqqqqqqwqqqqqqwqqqqqqqqqqwqqqqqqqqqqk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions