Popular recipes tagged "identity"http://code.activestate.com/recipes/tags/identity/2011-01-15T16:35:00-08:00ActiveState Code RecipesMonkey-patch execnet with more ssh settings, port, identity file, non-interactive (Python)
2011-01-15T16:35:00-08:00Dima Tisnekhttp://code.activestate.com/recipes/users/4068698/http://code.activestate.com/recipes/577545-monkey-patch-execnet-with-more-ssh-settings-port-i/
<p style="color: grey">
Python
recipe 577545
by <a href="/recipes/users/4068698/">Dima Tisnek</a>
(<a href="/recipes/tags/batchmode/">batchmode</a>, <a href="/recipes/tags/execnet/">execnet</a>, <a href="/recipes/tags/identity/">identity</a>, <a href="/recipes/tags/key/">key</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/noninteractive/">noninteractive</a>, <a href="/recipes/tags/port/">port</a>, <a href="/recipes/tags/public/">public</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/ssh/">ssh</a>).
</p>
<p>execnet ( <a href="http://codespeak.net/execnet/" rel="nofollow">http://codespeak.net/execnet/</a> ) is pretty cool, but its ssh support needs a few tweaks, here they are.</p>
<p>This snipped is a monkey patch, not a diff, import it and you can use execnet.makeportgateway instead of makegateway.</p>
<p>Adapt to your needs even more!</p>
Default arg special action (Python)
2010-04-14T19:52:33-07:00Ed Blakehttp://code.activestate.com/recipes/users/4173678/http://code.activestate.com/recipes/577194-default-arg-special-action/
<p style="color: grey">
Python
recipe 577194
by <a href="/recipes/users/4173678/">Ed Blake</a>
(<a href="/recipes/tags/default_arguments/">default_arguments</a>, <a href="/recipes/tags/identity/">identity</a>, <a href="/recipes/tags/oop/">oop</a>).
</p>
<p>A way to allow functions with 0, 1, and -1 arguments! For those times you want to differentiate a no value argument from a non-value argument.</p>
get index of element in list using identity (Python)
2008-08-16T19:41:37-07:00nosklohttp://code.activestate.com/recipes/users/4166478/http://code.activestate.com/recipes/576426-get-index-of-element-in-list-using-identity/
<p style="color: grey">
Python
recipe 576426
by <a href="/recipes/users/4166478/">nosklo</a>
(<a href="/recipes/tags/compare/">compare</a>, <a href="/recipes/tags/comparision/">comparision</a>, <a href="/recipes/tags/find/">find</a>, <a href="/recipes/tags/identity/">identity</a>, <a href="/recipes/tags/index/">index</a>, <a href="/recipes/tags/is/">is</a>, <a href="/recipes/tags/same_object/">same_object</a>, <a href="/recipes/tags/search/">search</a>).
Revision 2.
</p>
<p>my_list.index(element) returns the index of the element using common comparision (as in == or __eq__() or __cmp__()). If you need to find an element on the list using identity comparing (is) then this function can do it for you</p>