Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92689
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!1.eu.feeder.erje.net!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed2b.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <torriem+gmail@torriefamily.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.043 |
| X-Spam-Evidence | '*H*': 0.91; '*S*': 0.00; 'startup': 0.05; 'correct.': 0.07; 'api': 0.09; 'buttons': 0.09; 'example:': 0.11; 'curses': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'michael,': 0.16; 'stdin': 0.16; 'wifi': 0.16; 'wrote:': 0.16; 'implementing': 0.18; 'hack': 0.18; 'python?': 0.18; 'platforms': 0.18; 'runs': 0.18; '(the': 0.22; 'init': 0.22; 'keyboard': 0.22; 'simpler': 0.22; 'posted': 0.23; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'script': 0.25; 'header:User- Agent:1': 0.26; 'idea': 0.26; 'question': 0.26; 'linux': 0.26; "i'm": 0.29; 'looks': 0.29; 'there.': 0.30; 'certainly': 0.31; 'task': 0.31; 'run': 0.32; "can't": 0.32; 'up.': 0.32; 'probably': 0.32; 'impression': 0.33; 'joined': 0.33; 'message-id:@gmail.com': 0.35; 'to:addr:python-list': 0.35; 'but': 0.36; 'subject:: ': 0.37; 'received:org': 0.38; 'doing': 0.38; 'mean': 0.38; 'thank': 0.39; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'sure': 0.40; 'why': 0.40; 'your': 0.60; 'john': 0.61; 'default': 0.61; 'more': 0.62; 'fire': 0.63; 'you.': 0.64; 'making': 0.64; 'spend': 0.64; 'charset:windows-1252': 0.65; 'pin': 0.66; 'fact,': 0.67; 'laptop': 0.67; 'soon': 0.67; 'internet': 0.69; 'boots': 0.84; 'getty': 0.84; 'post,': 0.84; 'replies.': 0.84; 'treatment': 0.95 |
| X-Virus-Scanned | amavisd-new at torriefamily.org |
| Date | Tue, 16 Jun 2015 11:15:58 -0600 |
| From | Michael Torrie <torriem@gmail.com> |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
| MIME-Version | 1.0 |
| To | python-list@python.org |
| Subject | Re: Keypress Input |
| References | <rBHbx.75089$MO7.40532@fx10.iad> <Ojtfx.178941$Jv.137884@fx26.iad> |
| In-Reply-To | <Ojtfx.178941$Jv.137884@fx26.iad> |
| Content-Type | text/plain; charset=windows-1252 |
| Content-Transfer-Encoding | 7bit |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.20+ |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.519.1434474965.13271.python-list@python.org> (permalink) |
| Lines | 32 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1434474965 news.xs4all.nl 2890 [2001:888:2000:d::a6]:46600 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:92689 |
Show key headers only | View raw
On 06/14/2015 11:23 PM, John McKenzie wrote: > Thank to the others who joined in and posted replies. > > Michael, your assumption is correct. To quote my original post, "and I > want this working on a Raspberry Pi." Doing a superficial look at curses > and getch it looks excessively complicated. I was under the impression it > was not multi-platform and Linux was excluded. Searching for getch and > raspberry pi on the web I see it is not and is available for Raspian. > > Worried about implementing it but I will consider it again. May spend > time reading about during my treatment tomorrow as the hospital has wifi > and Internet access and I am allowed to have my laptop there. I'm not sure exactly what you mean by not available on Linux. Curses provides the same API on all platforms it runs on and I know it can read keystrokes. Curses getch is certainly available on Linux. In fact, here's an example: http://stackoverflow.com/questions/10693256/how-to-accept-keypress-in-command-line-python Again, however, you probably can't just fire up your program from a startup script and have it run automatically, since stdin for a script is not going to be the tty. One idea would be to run your program from init as a getty on tty1 (the default tty). That would run as soon as it boots up. Though question for you. Why are you hooking the arcade buttons up to a kade USB device? Would not it be far simpler to hook the buttons directly to a GPIO pin and read them from python? You're already using GPIO pins to run the LEDs. Seems like the usb keyboard hack is unnecessary and it's making your task more difficult.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-03 18:22 +0000
Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-03 20:59 +0200
Re: Keypress Input Gary Herron <gherron@digipen.edu> - 2015-06-03 12:15 -0700
Re: Keypress Input Gary Herron <gherron@digipen.edu> - 2015-06-03 11:47 -0700
Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-04 12:50 +0200
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-06 18:28 +0000
Re: Keypress Input Laura Creighton <lac@openend.se> - 2015-06-06 22:52 +0200
Re: Keypress Input Chris Angelico <rosuav@gmail.com> - 2015-06-07 07:20 +1000
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-06 22:31 -0600
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-15 05:15 +0000
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-16 15:09 +0000
Re: Keypress Input Christian Gollwitzer <auriocus@gmx.de> - 2015-06-19 07:20 +0200
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-20 14:59 +0000
Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-15 18:03 -0700
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-15 22:30 -0600
Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 10:22 -0700
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-16 15:27 -0600
Re: Keypress Input Terry Reedy <tjreedy@udel.edu> - 2015-07-16 02:08 -0400
Re: Keypress Input Rick Johnson <rantingrickjohnson@gmail.com> - 2015-07-16 11:30 -0700
Re: Keypress Input Terry Reedy <tjreedy@udel.edu> - 2015-07-16 03:10 -0400
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-16 15:29 -0600
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-15 05:23 +0000
Re: Keypress Input Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2015-06-15 12:22 +0100
Re: Keypress Input Grant Edwards <invalid@invalid.invalid> - 2015-06-15 15:22 +0000
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-16 11:15 -0600
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-16 20:06 +0000
Re: Keypress Input Grant Edwards <invalid@invalid.invalid> - 2015-06-16 20:49 +0000
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-16 19:22 -0600
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-18 16:42 -0600
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-06-20 15:02 +0000
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-06-20 10:30 -0600
Re: Keypress Input Paul Rubin <no.email@nospam.invalid> - 2015-06-16 14:22 -0700
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-07-15 19:05 +0000
Re: Keypress Input Michael Torrie <torriem@gmail.com> - 2015-07-15 13:17 -0600
Re: Keypress Input John McKenzie <davros@bellaliant.net> - 2015-08-16 19:45 +0000
csiph-web