Re: Change serial timeout per read

2007-05-13 Thread James T. Dennis
[EMAIL PROTECTED] wrote: > I'm writing a driver in Python for an old fashioned piece of serial > equipment. Currently I'm using the USPP serial module. From what I can > see all the serial modules seem to set the timeout when you open a > serial port. This is not what I want to do. I need to change

Re: Change serial timeout per read

2007-05-11 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > What I actually want to do is to respond immediately if the expected > string comes in, but not raise a timeout unless it takes longer than > the maximum time. So if the device I'm communicating with usually > responds in a second, but _can_ take up to 20 seconds,

Re: Change serial timeout per read

2007-05-10 Thread rowan
> you will probably have to make the port non blocking, and roll your own > using different time.sleep(n) values between invocations to port.read(1) calls What I actually want to do is to respond immediately if the expected string comes in, but not raise a timeout unless it takes longer than the m

Re: Change serial timeout per read

2007-05-10 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> wrote: > I'm writing a driver in Python for an old fashioned piece of serial > equipment. Currently I'm using the USPP serial module. From what I can > see all the serial modules seem to set the timeout when you open a > serial port. This is not what I want to do. I need to ch

Change serial timeout per read

2007-05-09 Thread rowan
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when you open a serial port. This is not what I want to do. I need to change the timeout each time I do a "r