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


Groups > comp.lang.python > #45043 > unrolled thread

Re: Urgent:Serial Port Read/Write

Started byChris Angelico <rosuav@gmail.com>
First post2013-05-10 01:54 +1000
Last post2013-05-10 01:54 +1000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Urgent:Serial Port Read/Write Chris Angelico <rosuav@gmail.com> - 2013-05-10 01:54 +1000

#45043 — Re: Urgent:Serial Port Read/Write

FromChris Angelico <rosuav@gmail.com>
Date2013-05-10 01:54 +1000
SubjectRe: Urgent:Serial Port Read/Write
Message-ID<mailman.1497.1368114897.3114.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web