Popular recipes tagged "meta:requires=system"http://code.activestate.com/recipes/tags/meta:requires=system/2013-01-18T21:08:21-08:00ActiveState Code RecipesColour Bar And Greyscale Generator For Standard Text Mode Python. (Python) 2013-01-18T21:08:21-08:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578425-colour-bar-and-greyscale-generator-for-standard-te/ <p style="color: grey"> Python recipe 578425 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/bar/">bar</a>, <a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/colour/">colour</a>, <a href="/recipes/tags/generator/">generator</a>, <a href="/recipes/tags/gray/">gray</a>, <a href="/recipes/tags/grey/">grey</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/scale/">scale</a>). </p> <p>This is just a simple colour bar and combined greyscale generator for standard text mode Python...</p> <p>It relies on the _magic_ of the ANSI Escape sequences to work and does mess with the terminal colours but restores the colours back to the defaults...</p> <p>See the code for the machines tested on. It might need the colours adjusting for some terminals but I am sure that is not beyond the average coder...</p> <p>Written so that anyone can see how it works.</p> <p>To hide the cursor the command "tput" is assumed to be available, if not, try "setterm -cursor off" and "setterm -cursor on" instead...</p> <p>Enjoy...</p> <p>Bazza, G0LCU...</p>