Popular recipes tagged "locate"http://code.activestate.com/recipes/tags/locate/popular/2012-06-17T17:10:29-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>