Do you know what token is?
I know what tokens mean, as I know that it have no meaning in the context you used it...
about console and stdout
$ print("hello there")
and press shift+o in renpy
I haven't asked what you meant by console stdout, but what it had to do with the rest of your question...
The goal is to show full sentence word by word like typewriter effect
Typewriters do not show the text word by word, by letter by letter...
when word tokens arrive into a beautiful book page with margins and new line.
I can't combine it into one string as word tokens arrive all the time
and i need to show them as soon as they in buffer.
Oh, so, what you want is to display a string that would update itself in real time...
Python:
define whatever = ""
screen mySelfUpdatingText():
text "[whatever]"
label whatever:
show screen mySelfUpdatingText
[whatever you code you want to update the 'whatever' variable]
It's actually very close to SSE server-sent events and i looking for good way to show words tokens
without waiting all text file to arrive.
And why the text wouldn't arrive as a whole ?
If it's sent through network, then the tokens would be around ~980 BYTE long, what is big for "tokens"... At least unless you explicitly ask the server to split the text into words, what, for something small enough to be displayed in a screen, would be counter productive because way too slow.
If it come from a file, there's no way to ask the content word by word, and asking the content character by character would always be slower than asking the content as a whole. This while asking the content as a whole wouldn't be slow enough to justify partial updates.
It's only if the data come from the keyboard, or any similar device, that it could possibly make sense. Yet, only if it works at key level, because at word level it would just be ridiculous.