Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45043
| 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 | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.117 |
| X-Spam-Level | * |
| X-Spam-Evidence | '*H*': 0.81; '*S*': 0.05; 'kumar': 0.09; 'propagate': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'ser.close()': 0.16; 'suppressing': 0.16; 'traceback.': 0.16; 'unhelpful': 0.16; 'exception': 0.16; 'wrote:': 0.18; 'print': 0.22; 'script.': 0.24; 'script': 0.25; 'this:': 0.26; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'message.': 0.35; 'except': 0.35; 'skip:s 30': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'show': 0.63; 'serial': 0.72; 'subject::': 0.85; 'absolutely': 0.87; 'subject:Port': 0.91; 'subject:Serial': 0.91; 'subject:Urgent': 0.96; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=GBiNv5YfrKQjgG8q40B5LOJOBqARlcUk5iWTLSUaTkE=; b=uTlJN4WmYaRSugcNrCz3bvszZQlwyTbZ+qUqFEIyPRXHtSRdO0Mx0XLPwn0Bb/F2GA VeGKxmFViyg/QvcPw0ILz3Sz1WdpKvZ6XygHA+p8hOfP13LD0iWcsqN3j/BuqUZcruSr eBYrTHDMXbaAHv21q5OBJmMfisGTO59wQ96byFXf055Ob75b26OdsxGEKkTqpIm98/cz qjL7/7CbVPvBikzYS6N9RS8kV4lqngVJe8kiwBcAnDMdqp7s+dw4puJXmXH9YJ1nHD1V B4Mn1Nh9N8i72UURxOH1P//Sl618ZpZ47isyipQEvFhgrS42/qAaxeAUBlu5fK0F6/xP JwVA== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.122.109 with SMTP id lr13mr7137396vdb.91.1368114888627; Thu, 09 May 2013 08:54:48 -0700 (PDT) |
| In-Reply-To | <1368113753.5157.YahooMailClassic@web190506.mail.sg3.yahoo.com> |
| References | <1368113753.5157.YahooMailClassic@web190506.mail.sg3.yahoo.com> |
| Date | Fri, 10 May 2013 01:54:48 +1000 |
| Subject | Re: Urgent:Serial Port Read/Write |
| 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 | <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.1497.1368114897.3114.python-list@python.org> (permalink) |
| Lines | 15 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1368114897 news.xs4all.nl 15959 [2001:888:2000:d::a6]:41326 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:45043 |
Show key headers only | View raw
On Fri, May 10, 2013 at 1:35 AM, chandan kumar <chandan_psr@yahoo.co.in> wrote:
> Please find the attached script and let me know whats wrong in my script
> and also how can i read data from serial port for the same script.
Don't do this:
except serial.serialutil.SerialException:
print "Exception"
ser.close()
Just let it propagate up and show you a traceback. There is absolutely
no value in suppressing an exception only to print an unhelpful
message.
ChrisA
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Urgent:Serial Port Read/Write Chris Angelico <rosuav@gmail.com> - 2013-05-10 01:54 +1000
csiph-web