Latest recipes tagged "clear"http://code.activestate.com/recipes/tags/clear/new/2014-12-17T19:03:15-08:00ActiveState Code RecipesClear Only Project Modules (Python) 2014-12-17T19:03:15-08:00Cornelius Jatniel Prinsloohttp://code.activestate.com/recipes/users/4191358/http://code.activestate.com/recipes/578982-clear-only-project-modules/ <p style="color: grey"> Python recipe 578982 by <a href="/recipes/users/4191358/">Cornelius Jatniel Prinsloo</a> (<a href="/recipes/tags/clear/">clear</a>, <a href="/recipes/tags/modules/">modules</a>, <a href="/recipes/tags/project/">project</a>, <a href="/recipes/tags/reload/">reload</a>, <a href="/recipes/tags/script/">script</a>, <a href="/recipes/tags/startup/">startup</a>). </p> <p>Useful for python sessions that have a long startup time because of external dependancies [In my case that would be pygame and pymunk] I've got a slow computer so it takes a while to startup this is the solution I came up with</p> <p>import this before any other of your project imports example: import reloading # The modules in your project folder get cleared then load the rest of your project modules</p> <p>make sure that the reloading script is in your project folder, or else it won't work</p> <p>You might be able to extend this by changing line</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>