Popular Python recipes tagged "key"http://code.activestate.com/recipes/langs/python/tags/key/2011-12-06T08:46:33-08:00ActiveState Code RecipesGet single keypress (Python) 2011-12-06T08:46:33-08:00Steven D'Apranohttp://code.activestate.com/recipes/users/4172944/http://code.activestate.com/recipes/577977-get-single-keypress/ <p style="color: grey"> Python recipe 577977 by <a href="/recipes/users/4172944/">Steven D'Aprano</a> (<a href="/recipes/tags/getch/">getch</a>, <a href="/recipes/tags/key/">key</a>). </p> <p>Here's a platform-independent module that exposes a single function, getch, which reads stdin for a single character. It uses msvcrt.getch on Windows, and should work on any platform that supports the tty and termios modules (e.g. Linux).</p> <p>This has been tested on Python 2.4, 2.5 and 2.6 on Linux.</p> Monkey-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> Changing shortcut on a usb key V2 (Python) 2008-08-22T13:34:57-07:00bussiere bussierehttp://code.activestate.com/recipes/users/4050557/http://code.activestate.com/recipes/576437-changing-shortcut-on-a-usb-key-v2/ <p style="color: grey"> Python recipe 576437 by <a href="/recipes/users/4050557/">bussiere bussiere</a> (<a href="/recipes/tags/key/">key</a>, <a href="/recipes/tags/raccourcis/">raccourcis</a>, <a href="/recipes/tags/shortcut/">shortcut</a>, <a href="/recipes/tags/usb/">usb</a>, <a href="/recipes/tags/windows/">windows</a>). Revision 2. </p> <p>i've made some shortcut on my usb key for launchy and i had always to change them if on one pc the usb drive was i: on an other it was k: it was such a pain each time. Now it change all the shortcut automatically.</p>