Python serial (pySerial) Reading lines with EOL r instead of n
Python serial (pySerial) Reading lines with EOL r instead of n Question: I am communicating with an SR830 lock-in amplifier via an RS232 cable. When reading the data as in the following code: import serial def main(): ser = serial.Serial( port=’COM6′, baudrate=19200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS) ser.timeout=1 ser.write(“OUTP? 1 rn”.encode()) #Asks the Lock-in for x-value ser.write(“++readrn”.encode()) …