
I have a table that I have formatted perfectly when printed out on the terminal. I'm using Python's BeautifulTable to format the table, and PySimpleGUI to create a multiline output window. I'd like the table to be printed to the GUI window for feedback to the user. I've done extensive Google searches, searches here on Stack Overflow, official product documentation, etc. I have set a max width on the table that is large enough, I've set static column widths to 25 and max table width to 200. But the table will automatically expand max width if the columns exceed that (according to documentation anyways). I have printed long lines to the multiline output window that exceed the width of the table to ensure it isn't a limitation of the PySimpleGUI output window. Above is an example of how it prints in the terminal vs. PySimpleGUI. No idea where to go next to figure out where the problem lies ...
BeautifulTable Format Perfect in Terminal, "Broken" in PySimpleGUI Output
485 Views Asked by spickles At
1
To get text to be aligned vertically you'll need to use a mono-spaced font.
I tend to use Courier as it's a universally available font.
The Multiline Element is suggested now to use instead of the Output element as it has a lot more options available and it's very difficult to use.
This program will show you the effect of using one versus not using one.