Popular recipes tagged "cursor"http://code.activestate.com/recipes/tags/cursor/popular/2014-04-16T15:36:04-07:00ActiveState Code RecipesPosition The Cursor Almost Anywhere Inside Standard Text Mode Python Terminal. (Python)
2012-06-17T17:10:29-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/578167-position-the-cursor-almost-anywhere-inside-standar/
<p style="color: grey">
Python
recipe 578167
by <a href="/recipes/users/4177147/">Barry Walker</a>
(<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/demo/">demo</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/locate/">locate</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/winuae/">winuae</a>).
</p>
<p>A DEMO showing the power of the ANSI (ASCII) _Esc_ codes in standard text mode Python.</p>
<p>ANSI _Esc_ codes here:- <a href="http://www.termsys.demon.co.uk/vtansi.htm" rel="nofollow">http://www.termsys.demon.co.uk/vtansi.htm</a></p>
<p>There are only three important things from the ANSI _Esc_ codes that are needed to obtain a neat finish to a program written in standard text mode Python:-</p>
<p>1) Clearing the screen. (Already done without the dedicated ANSI _Esc_ code!)</p>
<p>2) Colours and other character attributes. (Already done!)</p>
<p>3) A forced printing of a character or string from a given location inside the Terminal window.</p>
<p>To clear the screen does NOT require another dedicated ANSI _Esc_ code, (although it exists). This code uses the print("\r\n") method which works in all cases coupled with the one function supplied......</p>
<p>For The Classic AMIGA, E-UAE, WinUAE and Linux using Python(s) 1.4.0 to Python 3.2.2. Read the code for more information...</p>
<p>Enjoy finding simple solutions to often very difficult problems...</p>
<p>Bazza, G0LCU.</p>
Easy ansi color plus more. (Ruby)
2014-04-16T15:36:04-07:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/578018-easy-ansi-color-plus-more/
<p style="color: grey">
Ruby
recipe 578018
by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a>
(<a href="/recipes/tags/ansi/">ansi</a>, <a href="/recipes/tags/clear/">clear</a>, <a href="/recipes/tags/console/">console</a>, <a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/formatting/">formatting</a>, <a href="/recipes/tags/movement/">movement</a>, <a href="/recipes/tags/output/">output</a>, <a href="/recipes/tags/ruby/">ruby</a>, <a href="/recipes/tags/screen/">screen</a>, <a href="/recipes/tags/string/">string</a>, <a href="/recipes/tags/underline/">underline</a>).
</p>
<p>This quick class extends the base String class to add the ability to chain escape codes onto your output. For instance: puts 'String'.bold.underline.blink.red for something truly hideous. Aside from the colors (all are supported, but I haven't put in support for background colors as of the time of this post), cursor placement (ymmv based on the term type), screen clearing, bold, underline, blink reverse, conceal are all handled as well.</p>
Accessing cursors by field name (Python)
2010-04-09T22:50:04-07:00Ricardo Araozhttp://code.activestate.com/recipes/users/4173628/http://code.activestate.com/recipes/577186-accessing-cursors-by-field-name/
<p style="color: grey">
Python
recipe 577186
by <a href="/recipes/users/4173628/">Ricardo Araoz</a>
(<a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/database/">database</a>, <a href="/recipes/tags/datastructures/">datastructures</a>, <a href="/recipes/tags/field/">field</a>, <a href="/recipes/tags/name/">name</a>).
</p>
<p>This class allows you to access the rows of a cursor by field name.</p>
Komodo JS Macro - select the current word under the cursor (JavaScript)
2010-01-14T12:30:17-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577007-komodo-js-macro-select-the-current-word-under-the-/
<p style="color: grey">
JavaScript
recipe 577007
by <a href="/recipes/users/2666241/">Todd Whiteman</a>
(<a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/javascript/">javascript</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/toddw/">toddw</a>, <a href="/recipes/tags/word/">word</a>).
</p>
<p>A <a href="http://www.activestate.com/komodo">Komodo</a> JavaScript macro that can be used to select the current word under the cursor position.</p>
<p>Python version here: <a href="http://code.activestate.com/recipes/577006/">Recipe 577006</a>. </p>
Komodo Python Macro - select the current word under the cursor (Python)
2010-01-14T12:30:45-08:00Todd Whitemanhttp://code.activestate.com/recipes/users/2666241/http://code.activestate.com/recipes/577006-komodo-python-macro-select-the-current-word-under-/
<p style="color: grey">
Python
recipe 577006
by <a href="/recipes/users/2666241/">Todd Whiteman</a>
(<a href="/recipes/tags/cursor/">cursor</a>, <a href="/recipes/tags/komodo/">komodo</a>, <a href="/recipes/tags/macro/">macro</a>, <a href="/recipes/tags/toddw/">toddw</a>, <a href="/recipes/tags/word/">word</a>).
Revision 6.
</p>
<p>A <a href="http://www.activestate.com/komodo">Komodo</a> Python macro that can be used to select the current word under the cursor position.</p>
<p>JavaScript version here: <a href="http://code.activestate.com/recipes/577007/">Recipe 577007</a>.</p>