I'm new to python and I've write a simple code that reading lines from serial port and than write those lines to a text file. No errores occured, but the serial masseges did not appear in the text. the code:
import serial
ser = serial.Serial('COM32', baudrate=115200, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE,
bytesize=serial.EIGHTBITS, xonxoff=1)
text = open("temptext1.txt", "a+")
while 1:
read_line = ser.readline()
print read_line
text.write(read_line)
Thnaks for the helpers, i siriously dont have a clue how to debug this.