Normally I format text in a console with fixed-length characters. Now I want to do something similar in a tkinter messagebox, but this messes up the indentation. For example this
from tkinter import messagebox
info = {'Everything': 'first one', 'should be': 'second one', 'evenly outlined': 'another one', 'ms are really long':'previous to the last', 'mmmmmmmmmmmmmmm': "you see?"}
infostring = (f"{k: <20}:{v}" for k, v in info.items())
messagebox.askokcancel(
title="outlining",
icon=messagebox.QUESTION,
message=("Is this your outlined well?\n\n" + "\n".join(infostring)),
)
results in
whereas in a console it would be:
Everything :first one
should be :second one
evenly outlined :another one
ms are really long :previous to the last
mmmmmmmmmmmmmmm :you see?
And this is how I want it in the messagebox.

