Popular recipes by david.gaarenstroom http://code.activestate.com/recipes/users/4168848/2012-06-23T18:00:21-07:00ActiveState Code RecipesUserfriendly Webpage Template (Python)
2010-05-04T07:38:03-07:00david.gaarenstroomhttp://code.activestate.com/recipes/users/4168848/http://code.activestate.com/recipes/577203-userfriendly-webpage-template/
<p style="color: grey">
Python
recipe 577203
by <a href="/recipes/users/4168848/">david.gaarenstroom</a>
(<a href="/recipes/tags/cgi/">cgi</a>, <a href="/recipes/tags/html/">html</a>, <a href="/recipes/tags/httpserver/">httpserver</a>, <a href="/recipes/tags/mvc/">mvc</a>, <a href="/recipes/tags/template/">template</a>, <a href="/recipes/tags/web/">web</a>, <a href="/recipes/tags/webdesign/">webdesign</a>, <a href="/recipes/tags/webpagetemplate/">webpagetemplate</a>).
Revision 5.
</p>
<p>User friendly template class targeted towards Web-page usage and optimized for speed and efficiency.</p>
<p>Tags can be inserted in a template HTML file in a non-intrusive way, by using specially formatted comment strings. Therefore, the template-file can be viewed in a browser, even with prototype data embedded in it, which will later be replaced by dynamic content.
Also, webdesigners can continue to work on the template and upload it without further
modification.</p>
A nicer password container than str (Python)
2012-06-23T18:00:21-07:00david.gaarenstroomhttp://code.activestate.com/recipes/users/4168848/http://code.activestate.com/recipes/576905-a-nicer-password-container-than-str/
<p style="color: grey">
Python
recipe 576905
by <a href="/recipes/users/4168848/">david.gaarenstroom</a>
(<a href="/recipes/tags/passwd/">passwd</a>, <a href="/recipes/tags/password/">password</a>, <a href="/recipes/tags/passwords/">passwords</a>, <a href="/recipes/tags/security/">security</a>).
Revision 3.
</p>
<p>Because I did not want to expose my passwords in plain text whenever an exception was thrown or inside the debugger, I wrote this simple snippet. It's very simple, but can be quite useful nonetheless...</p>
Simple threading decorator (Python)
2009-03-10T01:38:51-07:00david.gaarenstroomhttp://code.activestate.com/recipes/users/4168848/http://code.activestate.com/recipes/576684-simple-threading-decorator/
<p style="color: grey">
Python
recipe 576684
by <a href="/recipes/users/4168848/">david.gaarenstroom</a>
(<a href="/recipes/tags/async/">async</a>, <a href="/recipes/tags/decorator/">decorator</a>, <a href="/recipes/tags/run_asynchronously/">run_asynchronously</a>, <a href="/recipes/tags/thread/">thread</a>, <a href="/recipes/tags/threading/">threading</a>).
Revision 4.
</p>
<p>When you're new at threading, using threads can be a bit daunting at first. If all you want is just to "run this function in parallel (= asynchronously) to the main program code", then this recipe can be of use. Simply use "@run_async" as a decorator for the function you want to run asynchronously. A call to that function will return immediately but the function itself will run in parallel.</p>