Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106972

Re: Convert input to upper case on screen as it is typed

Path csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail
From Ben Finney <ben+python@benfinney.id.au>
Newsgroups comp.lang.python
Subject Re: Convert input to upper case on screen as it is typed
Date Thu, 14 Apr 2016 15:17:24 +1000
Lines 20
Message-ID <mailman.92.1460611058.15650.python-list@python.org> (permalink)
References <85oa9cyiqt.fsf@benfinney.id.au> <mailman.90.1460604334.15650.python-list@python.org> <nen5jj$hvi$1@dont-email.me> <85k2k0ydjv.fsf@benfinney.id.au>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
X-Trace news.uni-berlin.de B746+Pxo66XpnD8osfePDARAC5H9U2hCoilQNZl4VXYg==
Cancel-Lock sha1:L5XqBaxYPIkxbJj+5PZsfYlz36o=
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.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.10; 'thu,': 0.15; '2016': 0.16; 'invoking': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:Convert': 0.16; 'subject:case': 0.16; 'subject:screen': 0.16; 'suggestion.': 0.16; 'using,': 0.16; 'wrote:': 0.16; 'driver': 0.18; 'input': 0.18; 'keyboard': 0.22; "user's": 0.22; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'linux': 0.26; 'dan': 0.29; 'intellectual': 0.29; 'convert': 0.29; 'program,': 0.29; 'code': 0.30; 'run': 0.33; 'source': 0.33; 'lock': 0.33; 'case,': 0.34; 'done': 0.35; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'thanks': 0.37; 'received:org': 0.37; 'anything': 0.38; 'does': 0.39; 'area': 0.39; 'to:addr:python.org': 0.40; 'customer': 0.62; 'special': 0.73; 'upper': 0.76; '+1000,': 0.84; '_o__)': 0.84; 'received:125': 0.84; '\xe2\x80\x9cthe': 0.93
X-Injected-Via-Gmane http://gmane.org/
X-Gmane-NNTP-Posting-Host jigong.madmonks.org
X-Public-Key-ID 0xAC128405
X-Public-Key-Fingerprint 517C F14B B2F3 98B0 CB35 4855 B8B2 4C06 AC12 8405
X-Public-Key-URL http://www.benfinney.id.au/contact/bfinney-pubkey.asc
X-Post-From Ben Finney <bignose+hates-spam@benfinney.id.au>
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.21
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>
X-Mailman-Original-Message-ID <85k2k0ydjv.fsf@benfinney.id.au>
X-Mailman-Original-References <85oa9cyiqt.fsf@benfinney.id.au> <mailman.90.1460604334.15650.python-list@python.org> <nen5jj$hvi$1@dont-email.me>
Xref csiph.com comp.lang.python:106972

Show key headers only | View raw


Dan Sommers <dan@tombstonezero.net> writes:

> On Thu, 14 Apr 2016 13:25:14 +1000, Ben Finney wrote:
>
> > How can my Python program convert the user's keyboard input to upper
> > case, as though the user has CAPS LOCK enabled?
>
> I don't know which OS you're using, but if I run "stty olcuc" in my
> Linux shell, then the input driver does that for me.

Thanks for the suggestion. I need a solution that is specific to the
Python program: it should only affect this program, and should not need
anything special done to the terminal when invoking the program.

-- 
 \            “The whole area of [treating source code as intellectual |
  `\    property] is almost assuring a customer that you are not going |
_o__)               to do any innovation in the future.” —Gary Barnett |
Ben Finney

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Convert input to upper case on screen as it is typed Ben Finney <ben+python@benfinney.id.au> - 2016-04-14 13:25 +1000
  Re: Convert input to upper case on screen as it is typed Dan Sommers <dan@tombstonezero.net> - 2016-04-14 04:16 +0000
    Re: Convert input to upper case on screen as it is typed Ben Finney <ben+python@benfinney.id.au> - 2016-04-14 15:17 +1000
      Re: Convert input to upper case on screen as it is typed Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-14 18:35 +1200
    Re: Convert input to upper case on screen as it is typed Ben Finney <ben+python@benfinney.id.au> - 2016-04-14 17:53 +1000
      Re: Convert input to upper case on screen as it is typed Steven D'Aprano <steve@pearwood.info> - 2016-04-14 21:43 +1000
    Re: Convert input to upper case on screen as it is typed Ben Finney <ben+python@benfinney.id.au> - 2016-04-14 18:37 +1000
      Re: Convert input to upper case on screen as it is typed Marko Rauhamaa <marko@pacujo.net> - 2016-04-14 12:22 +0300
    Re: Convert input to upper case on screen as it is typed Chris Angelico <rosuav@gmail.com> - 2016-04-14 18:45 +1000
    Re: Convert input to upper case on screen as it is typed Ben Finney <ben+python@benfinney.id.au> - 2016-04-19 05:11 +1000
      Re: Convert input to upper case on screen as it is typed Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2016-04-19 17:46 +1200

csiph-web