Rob wrote:
> try:
> response = p.readline()
> except SerialException:
> print ">>>>>Timed out<<<<<"
> try:
> port.writelines(msg)
> except OSError:
> print "Serial port failure. Power cycle units"
> port.close()
> sys.exit(1)
>
> Does anyone have any ideas?
It'd be a good idea to print all exceptions, it can help debugging the
problem (if you don't like it going to the screen of an end user at
least write it to a log file):
except SerialException, err:
print err
print ">>>>>Timed out<<<<<"
except OSError, err:
print err
print "Serial port failure. Power cycle units"
and in your OpenPort function too.
-- Leo
--
http://mail.python.org/mailman/listinfo/python-list