On 2006-03-07, luca72 <[EMAIL PROTECTED]> wrote: > Here is my code; why after the readline the port close? > > ser = serial.Serial(0) > ser.baudrate = 9600 > ser.parity = serial.PARITY_ODD > ser.stopbits = serial.STOPBITS_TWO > ser.bytesize =serial.EIGHTBITS > ser.setRTS(level = 0) > ser.setDTR(level = 0) > ser.timeout = 1 > > ser.readline() > > Why after this the port close.
Because the "ser" object is never used after that point, so it get's garbage collected and deleted. -- Grant Edwards grante Yow! for ARTIFICIAL at FLAVORING!! visi.com -- http://mail.python.org/mailman/listinfo/python-list