Have you ever wanted to get user input from your command line program? Or maybe color the output a bit? Or do you want to write an immersive terminal application like top, or even vim? Then you need to speak a bit of terminal! This talk describes how to talk to your terminal from scratch and goes on to show why the Python library prompt-toolkit is so awesome.
The terminal emulators we run so many of our programming tools in are more powerful than we give them credit for, and the key to that power is understanding the interface. This talk will cover terminal colors and styles, writing to arbitrary portions of the screen, handling signals from the terminal, determining the terminal’s dimensions and scrollback buffer behavior.
Terminal programming can get hairy, especially if you want to support multiple platforms like Mac, Linux and Win; along the way we’ll deal with encoding issues, automatisation issues and look into 4 decades’ of terminal communication. By gaining a deeper understanding of these issues, we’ll be able to choose from the abstractions over them offered by Python libraries like Blessings, prompt-toolkit, asciimatics etc.