Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39391
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.014 |
| X-Spam-Evidence | '*H*': 0.97; '*S*': 0.00; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:keys': 0.09; 'looked': 0.10; 'curses': 0.16; 'pygame': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'wrote:': 0.17; 'shell': 0.18; 'module': 0.19; 'keys': 0.22; 'header:User-Agent:1': 0.26; 'library.': 0.27; "doesn't": 0.28; 'header:X-Complaints-To:1': 0.28; 'attempting': 0.29; 'probably': 0.29; "i'm": 0.29; 'error': 0.30; 'url:python': 0.32; 'running': 0.32; 'could': 0.32; 'to:addr:python-list': 0.33; 'direction': 0.35; 'remote': 0.35; 'something': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'url:org': 0.36; 'url:library': 0.36; 'charset:us-ascii': 0.36; 'subject:: ': 0.38; 'url:docs': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'think': 0.40; 'within': 0.64; 'received:204': 0.72; 'article': 0.78; 'experiment': 0.84; 'received:204.14': 0.84; 'phil': 0.91 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Ned Deily <nad@acm.org> |
| Subject | Re: Read arrow keys |
| Date | Wed, 20 Feb 2013 19:36:24 -0800 |
| References | <51255C8A.7090302@bigpond.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| X-Gmane-NNTP-Posting-Host | 204.14.154.191 |
| User-Agent | MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2136.1361417816.2939.python-list@python.org> (permalink) |
| Lines | 24 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1361417816 news.xs4all.nl 6890 [2001:888:2000:d::a6]:49990 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:39391 |
Show key headers only | View raw
In article <51255C8A.7090302@bigpond.com>, Phil <phil_lor@bigpond.com> wrote: > I'm attempting to put a simple remote control program together and to do > so I need to check if the arrows are pressed. I could probably do this > with pyqt4 but I'm looking for something simple to experiment with. > > Pygame looked like a suitable solution but the error message makes me > think that pygame doesn't work from the console: > > "video system not initialized" > > Is there a simple way to read the direction keys within a while loop? You don't say which o/s platform(s) you are interested in but, if they are all unix-y and you don't mind running from a shell terminal session, you could just use the venerable curses module in the Python standard library. http://docs.python.org/3/library/curses.html -- Ned Deily, nad@acm.org
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Read arrow keys Ned Deily <nad@acm.org> - 2013-02-20 19:36 -0800
csiph-web