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.
Post History
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 ...
#3: Post edited
- 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?
- 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.
#2: Post edited
Can you have syntax highlighting for streaming text?
- Can you have syntax highlighting for streaming text in Python?
#1: Initial revision
Can you have syntax highlighting for streaming text?
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?