Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #60331
| Path | csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.054 |
| X-Spam-Evidence | '*H*': 0.89; '*S*': 0.00; 'url:pipermail': 0.05; 'socket': 0.07; '(data': 0.16; '24,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'pressing': 0.16; 'quoted': 0.16; 'subject: ..': 0.16; 'subject:stuck': 0.16; 'wrote:': 0.18; 'properly': 0.19; 'split': 0.19; 'subject:need': 0.19; 'typing': 0.19; 'print': 0.22; 'comparing': 0.24; 'stick': 0.24; 'posts': 0.26; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'ball': 0.31; 'text': 0.33; 'says': 0.33; 'url:python': 0.33; 'subject:time': 0.33; 'subject:from': 0.34; 'received:google.com': 0.35; 'google': 0.35; 'url:org': 0.36; 'wrong': 0.37; 'two': 0.37; 'problems': 0.38; 'nov': 0.38; 'handle': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'how': 0.40; 'even': 0.60; 'read': 0.60; 'most': 0.60; "you're": 0.61; "you'll": 0.62; 'dont': 0.67; 'groups.': 0.74; 'obvious': 0.74; 'subject:,': 0.80; 'subject:this': 0.83; 'subject:much': 0.91; '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:date:message-id:subject:from:to :content-type; bh=t7sMby1hV4h9clEO+o4Gf/HQhu4rBmsxxU8A+4m9Ado=; b=WzPHne+Rlc0zZJkTfwf8MsoeXsYPvqycxvhY8CeoMCclzQtjVtSjhQTwjnkah+hBwV SKvypgDZ3gjIKWHnQ2HFxiLpug0fQlK4C2fwg4eW8DhuuiXcERUAS2/p0kF9XmDFRDMJ EuIDXUaNVInV+WQr7cRXMsZDaMxuCrsW2giLW6L1qeygFUe7dYXyEHphsS4NzWk28f/A 6CbHsdqlkR0vOvLvHReQt9Zs4Xlqiia+6R84kaoYhfrEC9LftYJe53W5WLEscjKYV2Is 0/RflATK9V14j6U7NnkzlxTSHPHJuLplHQefDkIn6u+OI9msW4+aawgzRxjQ+iWW2Xgy FLmA== |
| MIME-Version | 1.0 |
| X-Received | by 10.68.178.197 with SMTP id da5mr19194790pbc.28.1385246490232; Sat, 23 Nov 2013 14:41:30 -0800 (PST) |
| In-Reply-To | <8445e47e-7efe-4f37-9b40-db2896d581f8@googlegroups.com> |
| References | <a4a25260-4786-4b2b-81f5-5da87b05d301@googlegroups.com> <mailman.3102.1385245397.18130.python-list@python.org> <8445e47e-7efe-4f37-9b40-db2896d581f8@googlegroups.com> |
| Date | Sun, 24 Nov 2013 09:41:30 +1100 |
| Subject | Re: stuck at this from so much time,need help....please .. |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| 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 | <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.3104.1385246500.18130.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1385246500 news.xs4all.nl 15932 [2001:888:2000:d::a6]:50623 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:60331 |
Show key headers only | View raw
On Sun, Nov 24, 2013 at 9:33 AM, Bhanu Karthik <bhanukarthik2002@gmail.com> wrote: > this is exact code.. > it is not even entering the if ... > I tried ( c= (data is '/quit')if c) > > when i print c ,its printing false....I dont understand what is happening...please help.. Again, please get off Google Groups. Have a look at how your posts come out: https://mail.python.org/pipermail/python-list/2013-November/661005.html Note how your quoted text is double-spaced. This is one of the most obvious and obnoxious problems, though not the only one. You have two problems here. Firstly, comparing strings with 'is' is wrong in most cases[1], so stick with ==. And secondly, my crystal ball says that you're typing "/quit" and pressing enter, so your socket read will be "/quit\r\n" or "/quit\n". To properly handle this, you'll need to buffer and split as I was describing. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
stuck at this from so much time,need help....please .. Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-23 14:15 -0800
Re: stuck at this from so much time,need help....please .. Chris Angelico <rosuav@gmail.com> - 2013-11-24 09:23 +1100
Re: stuck at this from so much time,need help....please .. Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-23 14:29 -0800
Re: stuck at this from so much time,need help....please .. Chris Angelico <rosuav@gmail.com> - 2013-11-24 09:32 +1100
Re: stuck at this from so much time,need help....please .. MRAB <python@mrabarnett.plus.com> - 2013-11-23 22:58 +0000
Re: stuck at this from so much time,need help....please .. Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-23 14:33 -0800
Re: stuck at this from so much time,need help....please .. Roy Smith <roy@panix.com> - 2013-11-23 17:37 -0500
Re: stuck at this from so much time,need help....please .. Bhanu Karthik <bhanukarthik2002@gmail.com> - 2013-11-23 14:39 -0800
Re: stuck at this from so much time,need help....please .. Chris Angelico <rosuav@gmail.com> - 2013-11-24 09:46 +1100
Re: stuck at this from so much time,need help....please .. Chris Angelico <rosuav@gmail.com> - 2013-11-24 09:41 +1100
csiph-web