If you install BearLibTerminal via pip. The tags do NOT function properly. As in they do not no aligning or wrapping at all.
As I mentioned a few posts above, in the latest update 'wrap' and 'align' tags were removed in favor of proper function arguments. E. g.
terminal.print(2, 1, some_str, width=10, height=5, align=terminal.TK_ALIGN_RIGHT);
This actually shuffled things a bit for python print function =|. Originally there was
printf because you can't use
print identifier in Python 2 and
print_ looks weird. So I went with
printf as a workaround and obviously had to make it support formatting to match the name. But when I tried to add optional keyword arguments for area and alignment, it did not work with formatting part. Turns out, you can't have a signature like
def printf(x, y, s, *args, width=0, height=0, alignment=0):
Only **kwargs may come after *args. And making optional arguments nameless hurts the usability.
Since formatting was never an objective (unlike C++, Python has good string formatting out of the box), I changed string output function name to
puts. Like
put for putting characters/tiles and
puts for putting stirngs, with
print_ and
print (in Python3) aliases. The
printf was left for some compatibility (I would mark it as deprecated if I knew how) but for reasons stated above it does not have wrapping and alignment support anymore.
BUT If you use PyBearLibTerminal and BearLibTerminal.dll from the "blt-samples" master, they work just fine.
That's because it is a separate repository and probably has a previous library version. Should do something about it.