Most viewed recipes tagged "bar"http://code.activestate.com/recipes/tags/bar/views/2013-09-17T17:55:53-07:00ActiveState Code RecipesA DEMO to show how to write text into the Python terminal Title Bar... (Python) 2013-09-17T17:55:53-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578662-a-demo-to-show-how-to-write-text-into-the-python-t/ <p style="color: grey"> Python recipe 578662 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/cygwin/">cygwin</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/title/">title</a>, <a href="/recipes/tags/title_bar/">title_bar</a>). </p> <p>This DEMO is show how to write some text of your choice into the Title Bar of the Python terminal window.</p> <p>Firstly it imports "time" just for this demo so that a simple time delay can be generated. Next the Python terminal window is written to for the 5 seconds of delay; see code. And finally the Title Bar is restored to normal...</p> <p>A snapshot image can be seen here:-</p> <p><a href="http://wisecracker.host22.com/public/Title_Bar.jpg" rel="nofollow">http://wisecracker.host22.com/public/Title_Bar.jpg</a></p> <p>Bazza...</p> Simple Cli Progress Bar (Python) 2011-11-22T22:00:44-08:00Samuele Millevoltehttp://code.activestate.com/recipes/users/4180021/http://code.activestate.com/recipes/577956-simple-cli-progress-bar/ <p style="color: grey"> Python recipe 577956 by <a href="/recipes/users/4180021/">Samuele Millevolte</a> (<a href="/recipes/tags/bar/">bar</a>, <a href="/recipes/tags/progress/">progress</a>, <a href="/recipes/tags/progress_bar/">progress_bar</a>, <a href="/recipes/tags/python/">python</a>). Revision 2. </p> <p>It's a simple function to print a progress bar under cli. When you call the function you have to indicate the max level that indicates 100% and what has been done considering the max level.</p> Colour 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>