Popular recipes tagged "input" but not "python3"http://code.activestate.com/recipes/tags/input-python3/2015-10-26T19:14:01-07:00ActiveState Code RecipesPYQT TOUCH INPUT (Python) 2015-10-26T19:14:01-07:00jshahhttp://code.activestate.com/recipes/users/4193036/http://code.activestate.com/recipes/579118-pyqt-touch-input/ <p style="color: grey"> Python recipe 579118 by <a href="/recipes/users/4193036/">jshah</a> (<a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/python2/">python2</a>, <a href="/recipes/tags/qt4/">qt4</a>, <a href="/recipes/tags/touch/">touch</a>). </p> <p>PYQT TOUCH INPUT WIDGET </p> Non-blocking readlines() (Python) 2014-06-30T20:30:57-07:00Zack Weinberghttp://code.activestate.com/recipes/users/4190298/http://code.activestate.com/recipes/578900-non-blocking-readlines/ <p style="color: grey"> Python recipe 578900 by <a href="/recipes/users/4190298/">Zack Weinberg</a> (<a href="/recipes/tags/concurrency/">concurrency</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/line/">line</a>, <a href="/recipes/tags/nonblocking/">nonblocking</a>). </p> <p>A generator function which takes a file object (assumed to be some sort of pipe or socket, open for reading), and yields lines from it without blocking. If there is no input available, it will yield an endless stream of empty strings until input becomes available again; caller is responsible for not going into a busy loop. (Newlines are normalized but not stripped, so if there is actually a blank line in the input, the value yielded will be <code>'\n'</code>.) The intended use case is a thread which must respond promptly to input from a pipe, and also something else which cannot be fed to <code>select</code> (e.g. a <code>queue.Queue</code>). Note that the file object is ignored except for its <code>fileno</code>.</p> <p>Only tested on Unix. Only tested on 3.4; ought to work with any python that has <code>bytearray</code>, <code>locale.getpreferredencoding</code>, and <code>fcntl</code>.</p> Python Awesome DD (Python) 2014-07-12T07:29:59-07:00Mike 'Fuzzy' Partinhttp://code.activestate.com/recipes/users/4179778/http://code.activestate.com/recipes/578907-python-awesome-dd/ <p style="color: grey"> Python recipe 578907 by <a href="/recipes/users/4179778/">Mike 'Fuzzy' Partin</a> (<a href="/recipes/tags/curses/">curses</a>, <a href="/recipes/tags/dd/">dd</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/output/">output</a>, <a href="/recipes/tags/progress_bar/">progress_bar</a>). Revision 3. </p> <p>Imagine if the *nix utilities 'dd', 'wget', and 'pv' had a baby. That baby would be named 'padd'. A 'dd' replacement (most commonly used options translate with no problem), that gives progress output like 'pv' and supports (currently) http(s) and ftp input sources, with more planned (sftp for one). Output support for ftp, sftp, and http(s) is also planned.</p> Remove the real "input()" function from a current text mode Python 1.4.0 to 2.7.2 session... (Python) 2011-10-13T19:04:45-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577906-remove-the-real-input-function-from-a-current-text/ <p style="color: grey"> Python recipe 577906 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/apple/">apple</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/macbook_pro/">macbook_pro</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>The single very powerful line of just the fifteen ASCII characters says it all...</p> <p>Read the code for more information...</p> <p>Tested on the platforms and versions inside the code...</p> <p>This is entirely Public Domain and hopefully it will be of use to many a Python coder...</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza, G0LCU...</p> "raw_input" For All Versions Of Python... (Python) 2011-08-10T16:52:04-07:00Barry Walkerhttp://code.activestate.com/recipes/users/4177147/http://code.activestate.com/recipes/577836-raw_input-for-all-versions-of-python/ <p style="color: grey"> Python recipe 577836 by <a href="/recipes/users/4177147/">Barry Walker</a> (<a href="/recipes/tags/amiga/">amiga</a>, <a href="/recipes/tags/e_uae/">e_uae</a>, <a href="/recipes/tags/input/">input</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/raw_input/">raw_input</a>, <a href="/recipes/tags/windows/">windows</a>, <a href="/recipes/tags/winuae/">winuae</a>). </p> <p>The code says it all... ;o)</p> <p>Put the two lines in any Python code and have universal KB input...</p> <p>Enjoy finding simple solutions to often very difficult problems...</p> <p>Bazza, G0LCU...</p>