Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Can you have syntax highlighting for streaming text in Python?
Parent
Can you have syntax highlighting for streaming text in Python?
Suppose you have a situation where text is coming 1 word at a time, and you want to quickly show it to the user. "Quickly" is not in the sense of a performance constraint, but rather we don't want to wait until the end of the stream to apply highlighting as that would take too long. The rate is somewhat slow and sometimes the stream can be quite long.
The text is markdown but can often include substantial code. It would be important for the code to be highlighted well also. Sometimes the code fences indicate language, sometimes not.
Is this feasible, and how? I am asking specifically for printing text from a Python program.
Post
Does bat
work for this, as well as for your other question? I see you have tagged your question as Python, but I'm not sure I understand how it's relevant.
Sources: this issue comment and also that one.
0 comment threads