On Thursday 23 December 2010, Mick Sulley elucidated thus:
> Hi,
>
> I have a python program using pyowfs to read a 1-wire network.  The
> system overall works very well, but I have been trying to make it
> more robust, giving error messages for as many problems as I can, but
> what I have not been able to to get is 1-wire not plugged into the
> serial port, or plugged into the wrong serial port.
>
> My code has -
>
> from pyowfs import Connection
> connection = Connection("/dev/ttyS0")
>
> If the 1-wire is not plugged in to ttyS0 the second of those lines
> just hangs.  Is there any way to put a timeout on it and get it to
> return an error message?  I have tried a few things but can't get
> anything to work.

Have you tried the 'signal' module, and settings alarms?

j

-- 
Joshua J. Kugler - Fairbanks, Alaska
Azariah Enterprises - Programming and Website Design
jos...@azariah.com - Jabber: pedah...@gmail.com
PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to