Popular recipes tagged "style" but not "metro"http://code.activestate.com/recipes/tags/style-metro/2011-10-24T22:26:07-07:00ActiveState Code RecipesBlocks for python (Python)
2011-10-24T22:26:07-07:00yoav glaznerhttp://code.activestate.com/recipes/users/4178625/http://code.activestate.com/recipes/577920-blocks-for-python/
<p style="color: grey">
Python
recipe 577920
by <a href="/recipes/users/4178625/">yoav glazner</a>
(<a href="/recipes/tags/block/">block</a>, <a href="/recipes/tags/lambda/">lambda</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/style/">style</a>).
</p>
<p>A simple <strong>block</strong> function that lets one send multi line blocks of code to a function
it doesn't really act like a <em>normal</em> def/lambda but offers cool style</p>
McCarthy's amb operator in Python (Python)
2010-08-23T22:41:53-07:00Paddy McCarthyhttp://code.activestate.com/recipes/users/398009/http://code.activestate.com/recipes/577368-mccarthys-amb-operator-in-python/
<p style="color: grey">
Python
recipe 577368
by <a href="/recipes/users/398009/">Paddy McCarthy</a>
(<a href="/recipes/tags/declarative/">declarative</a>, <a href="/recipes/tags/style/">style</a>).
</p>
<p>From reading about amb it seems that it allows for a declaritive style of programming where the one amb "operator" can
* Set the ranges of variables
* Set a constraint function
* And iterate over all solutions </p>
<p>(See <a href="http://paddy3118.blogspot.com/2010/08/mccarthys-amb-operator-in-python.html" rel="nofollow">http://paddy3118.blogspot.com/2010/08/mccarthys-amb-operator-in-python.html</a> for a more descriptive intro).</p>
unset engine in gtkrc; unset widget style in gtk (Python)
2009-07-13T06:51:51-07:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/576840-unset-engine-in-gtkrc-unset-widget-style-in-gtk/
<p style="color: grey">
Python
recipe 576840
by <a href="/recipes/users/4068698/">Dima Tisnek</a>
(<a href="/recipes/tags/engine/">engine</a>, <a href="/recipes/tags/gtkp/">gtkp</a>, <a href="/recipes/tags/gtkrc/">gtkrc</a>, <a href="/recipes/tags/pixbuf/">pixbuf</a>, <a href="/recipes/tags/pygtk/">pygtk</a>, <a href="/recipes/tags/rc/">rc</a>, <a href="/recipes/tags/rcstyle/">rcstyle</a>, <a href="/recipes/tags/style/">style</a>, <a href="/recipes/tags/theme/">theme</a>).
</p>
<p>Example shows how to unset gtk engine'd look for a particular widget.</p>
<p>gtk.Widget.modify_xx allows you to override simple properties, like backgrounds (unless theme uses an engine) and text color (sometimes (?))
gtkrc allows you to override most properties for all or selected widgets, like sizes, faces, and so on.
some parts of widget appearance are set through engine stanzas in gtkrc, these can be unset too, if you know how...</p>
<p>here it is!</p>