Popular recipes tagged "meta:requires=curses"http://code.activestate.com/recipes/tags/meta:requires=curses/2014-07-12T07:29:59-07:00ActiveState Code RecipesPython Awesome DD (Python) 2014-07-12T07:29:59-07:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/578907-python-awesome-dd/ <p style="color: grey"> Python recipe 578907 by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a> (<a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/dd/">dd</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/output/">output</a>, <a href="/recipes/tags/progress_bar/">progress_bar</a>). Revision 3. </p> <p>Imagine if the *nix utilities 'dd', 'wget', and 'pv' had a baby. That baby would be named 'padd'. A 'dd' replacement (most commonly used options translate with no problem), that gives progress output like 'pv' and supports (currently) http(s) and ftp input sources, with more planned (sftp for one). Output support for ftp, sftp, and http(s) is also planned.</p> Simple curses based MySQL 'top' (Python) 2011-11-02T20:28:48-07:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/577936-simple-curses-based-mysql-top/ <p style="color: grey"> Python recipe 577936 by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a> (<a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/mysql/">mysql</a>, <a href="/recipes/tags/time/">time</a>). Revision 3. </p> <p>This is little more than a modification of my previous recipe, however, I found it useful so I thought I would post it in the hopes that someone else would as well. There is color (BOLD white really) designation for 'Query' states vs others like 'Sleep'. </p> DistCC 'top' (Python) 2013-12-01T11:19:56-08:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/577933-distcc-top/ <p style="color: grey"> Python recipe 577933 by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a> (<a href="/recipes/tags/color/">color</a>, <a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/distcc/">distcc</a>, <a href="/recipes/tags/distributed/">distributed</a>, <a href="/recipes/tags/monitor/">monitor</a>, <a href="/recipes/tags/pack/">pack</a>, <a href="/recipes/tags/struct/">struct</a>, <a href="/recipes/tags/top/">top</a>, <a href="/recipes/tags/unpack/">unpack</a>). Revision 3. </p> <p>A small recipe for a curses based, 'top'-like monitor for DistCC. I know there is already distccmon-text, but I don't like it, and much prefer this sytle of monitoring. Note that I don't keep hosts around in the list like distccmon-gui/gnome. The screen is drawn for exactly what is currently in state. The terminal size is respected at initialization time, however resize events aren't handled. There is color designation of job types.</p> Binary BCD clock using curses (Python) 2010-10-19T10:40:36-07:00Michal Niklashttp://code.activestate.com/recipes/users/186902/http://code.activestate.com/recipes/577430-binary-bcd-clock-using-curses/ <p style="color: grey"> Python recipe 577430 by <a href="/recipes/users/186902/">Michal Niklas</a> (<a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/time/">time</a>). </p> <p>Converts actual time to vertical BCD digits. So actual time, 12:37:51 looks like:</p> <pre class="prettyprint"><code>...... ...**. .***.. *.**** </code></pre> Using terminfo for portable color output & cursor control (Python) 2006-03-27T19:20:16-08:00Edward Loperhttp://code.activestate.com/recipes/users/2637812/http://code.activestate.com/recipes/475116-using-terminfo-for-portable-color-output-cursor-co/ <p style="color: grey"> Python recipe 475116 by <a href="/recipes/users/2637812/">Edward Loper</a> (<a href="/recipes/tags/text/">text</a>). Revision 3. </p> <p>The curses module defines several functions (based on terminfo) that can be used to perform lightweight cursor control &amp; output formatting (color, bold, etc). These can be used without invoking curses mode (curses.initwin) or using any of the more heavy-weight curses functionality. This recipe defines a TerminalController class, which can make portable output formatting very simple. Formatting modes that are not supported by the terminal are simply omitted.</p> clear the screen (Python) 2006-09-04T14:52:58-07:00Ori Peleghttp://code.activestate.com/recipes/users/2056315/http://code.activestate.com/recipes/498064-clear-the-screen/ <p style="color: grey"> Python recipe 498064 by <a href="/recipes/users/2056315/">Ori Peleg</a> . </p> <p>Clear the screen on unix terminals, uses terminfo.</p> <p>terminfo inspiration courtesy of <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116</a></p> has_colors(stream): Does an output stream support colors? (Python) 2006-03-26T14:26:42-08:00Ori Peleghttp://code.activestate.com/recipes/users/2056315/http://code.activestate.com/recipes/475186-has_colorsstream-does-an-output-stream-support-col/ <p style="color: grey"> Python recipe 475186 by <a href="/recipes/users/2056315/">Ori Peleg</a> (<a href="/recipes/tags/programs/">programs</a>). </p> <p>Great for deciding automatically whether to use colors.</p> <p>Based on <a href="http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116" rel="nofollow">http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116</a></p>