How can I output colored text to the terminal, in Python? What is the best Unicode symbol to represent a solid block?
转载于:https://stackoverflow.com/questions/287871/print-in-terminal-with-colors
How can I output colored text to the terminal, in Python? What is the best Unicode symbol to represent a solid block?
转载于:https://stackoverflow.com/questions/287871/print-in-terminal-with-colors
For Windows you cannot print to console with colors unless you're using the win32api.
For Linux it's as simple as using print, with the escape sequences outlined here:
For the character to print like a box, it really depends on what font you are using for the console window. The pound symbol works well, but it depends on the font:
#