Popular recipes tagged "whitespace" but not "management"http://code.activestate.com/recipes/tags/whitespace-management/2011-07-17T19:48:14-07:00ActiveState Code RecipesWhitespace Interpreter (Python) 2010-05-24T12:02:11-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577110-whitespace-interpreter/ <p style="color: grey"> Python recipe 577110 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/interpreter/">interpreter</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). Revision 2. </p> <p>Runs programs in "Programs" and creates *.WSO files when needed.</p> <p>Can be executed directly by double-click or on the command line.</p> <p>If run on command line, add "ASM" flag to dump program assembly.</p> Whitespace Stack Calculator (Python) 2010-03-14T18:03:24-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577112-whitespace-stack-calculator/ <p style="color: grey"> Python recipe 577112 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/assembly/">assembly</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). </p> <p>This is a stack-based calculator that can run in Whitespace.</p> <p>Several functions and strings are written in its 1330 lines.</p> <p>Modifications were made to the interpreter for debugging it.</p> Whitespace Assembler (Python) 2011-07-17T19:48:14-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577108-whitespace-assembler/ <p style="color: grey"> Python recipe 577108 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/assembler/">assembler</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). Revision 3. </p> <p>Compiles a program from "Assembly" folder into "Program" folder.</p> <p>Can be executed directly by double-click or on the command line.</p> <p>Give name of *.WSA file without extension (example: stack_calc).</p> Whitespace Helpers (Python) 2010-03-14T15:36:03-07:00Stephen Chappellhttp://code.activestate.com/recipes/users/2608421/http://code.activestate.com/recipes/577109-whitespace-helpers/ <p style="color: grey"> Python recipe 577109 by <a href="/recipes/users/2608421/">Stephen Chappell</a> (<a href="/recipes/tags/helpers/">helpers</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). </p> <p>Includes a function to encode Python strings into my WSA format.</p> <p>Has a "PRINT_LINE" function that can be copied to a WSA program.</p> <p>Contains a "PRINT" function and documentation as an explanation.</p> Clean preceeding and trailing whitespace in complex list dictionary tuple structures (Python) 2008-08-06T15:16:54-07:00Willhttp://code.activestate.com/recipes/users/4166209/http://code.activestate.com/recipes/576409-clean-preceeding-and-trailing-whitespace-in-comple/ <p style="color: grey"> Python recipe 576409 by <a href="/recipes/users/4166209/">Will</a> (<a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/list/">list</a>, <a href="/recipes/tags/tuple/">tuple</a>, <a href="/recipes/tags/whitespace/">whitespace</a>). Revision 2. </p> <p>Function to clean trailing and or preceeding whitespace from string types in complex list, dictionary, and tuple structures. This is a recursive function to allow for complete coverage of all items in the structure. Wanted to share it as I needed it and after searching for a while I gave up and wrote one.</p> <p>For example a = ["\rText \r\n", "This one is fine", ["stuff ", [" Something Else"], 4, "Another ", "one", " with"], "\twhitespace\r\n"]</p> <p>print cleanWhiteSpace(a) Result: ["Text", "This one is fine", ["stuff", ["Something Else"], 4, "Another", "one", "with"], "whitespace"]</p>