Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.029 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'charset:iso-8859-7': 0.04; '22,': 0.09; 'subject:question': 0.10; 'buffer.': 0.16; 'uppercase': 0.16; 'sat,': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'keyboard': 0.24; 'question': 0.24; 'compare': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'correct': 0.29; 'character': 0.29; 'message-id:@mail.gmail.com': 0.30; "skip:' 10": 0.31; 'comparison': 0.31; 'yes.': 0.31; 'received:google.com': 0.35; 'false': 0.36; 'thanks': 0.36; 'being': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'simple': 0.61; 'email addr:gmail.com': 0.63; 'saturday': 0.68; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=yDphsHcqLJ9Ajge8Ppci8OUiav5AvKWZ7OgRMFQWF6A=; b=bgpTv80D0hvWLHVrPM908bBMe9S7UQ4VQ5eo3800g/lXZn7o0msNR2VdAyoMT796lc ilpRIMU0ezQFHNVZ+m+tmQEro2UZ+pHCvd67msv+gowhz7OnfM3+XLoYmqG9Fhcrj1dJ q2RE9rNgyDC0Wf5QoifVOTeqe3GzQ6VooxYIJ1Wsx/7Rdrnod7Tw1aUEAiMeElzHrxYK OTKuiql3dGxYNu/5OsFQEtu982DdtwUSfcTVsju7zLh5mLew8R9MGi9NurYaxTmiMbam KHG85yyPZ935HN45gYx9kvb5RaXQdteC089rhHMCGFpm2QDXvSk+0eemReg2h1bST4GD al1w== X-Received: by 10.66.27.172 with SMTP id u12mr1062023pag.209.1372187157689; Tue, 25 Jun 2013 12:05:57 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <201306222249.33354.gheskett@wdtv.com> References: <195f7100-c4bf-414d-a92f-5b8a70d896f7@googlegroups.com> <201306222249.33354.gheskett@wdtv.com> From: Ian Kelly Date: Tue, 25 Jun 2013 13:05:17 -0600 Subject: Re: newbie question To: Python Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372187160 news.xs4all.nl 15889 [2001:888:2000:d::a6]:59370 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49179 On Sat, Jun 22, 2013 at 8:49 PM, Gene Heskett wrote: > On Saturday 22 June 2013 22:46:51 christhecomic@gmail.com did opine: > >> Writing simple program asking a question with the answer being >> "yes"...how do I allow the correct answer if user types Yes, yes, or >> YES? >> >> Thanks > > AND each character coming in from the keyboard with $DF before adding it = to > the comparison buffer. Makes it all uppercase. Then compare it to the > uppercase YES. It's not working for me. >>> ''.join(chr(ord(c) & 0xdf) for c in '=ED=E1=DF') =3D=3D '=CD=C1=BA' False >>> ''.join(chr(ord(c) & 0xdf) for c in '=ED=E1=DF') '\x9d\x91\x8f'