Reputation: 1127
I am writing an interpreter in Python where the user has to type Prolog code and I'd like to implement dynamic syntax highlighting. So far my application (which should be cross-platform) is reading input and printing from/to the command prompt (on Windows). I've been looking at the pygments library, but I have no clue on how to modify the current line (being typed) on the command prompt.
So, I've also been looking at the curses library to implement an UI but that would leave Windows users out. Any suggestions? I just need to implement a quick UI to be able to dynamically highlight what is being typed.
Upvotes: 2
Views: 368