-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
Sometimes, the bottom border does not print until I create another table and print the second table. If there is text in between, that gets printed before the bottom border.
e.g. for
#!/usr/bin/env python3
from beautifultable import BeautifulTable
t = BeautifulTable(maxwidth=250, default_alignment=BeautifulTable.ALIGN_LEFT)
t.set_style(BeautifulTable.STYLE_BOX_ROUNDED)
t.rows.separator = ''
row = ['a', 'b']
t.rows.append(row)
t.rows.append(row)
print(t)
print('hello')
print(t)
print('hello')
sometimes it prints (as expected):
╭───┬───╮
│ a │ b │
│ a │ b │
╰───┴───╯
hello
╭───┬───╮
│ a │ b │
│ a │ b │
╰───┴───╯
hello
but sometimes it prints the following
╭───┬───╮
│ a │ b │
│ a │ b │
hello
╰───┴───╯
╭───┬───╮
│ a │ b │
│ a │ b │
hello
╰───┴───╯
I have not been able to determine what triggers the different behaviour, but it is consistent when it happens. i.e. it's always just the bottom border that is not printed until either the end of the program, or until the next table is printed (like either of those things causes it to be flushed. Generally there is a lot of intermediate printing in between tables, not just one line.
Metadata
Metadata
Assignees
Labels
No labels