

InterviewSolution
1. |
Solve : Python, BCC, and data fidelity? |
Answer» Is there a way to GET Python to ignore or recognize the line feed character ('\n' or '\x0A') as such? I've got an ANALYZER sending data to a server via a serial port, and I'm trying to get the server to parse the data and stow it away in a text file or database file in real time. Piecing together code examples from several places, I've got the server checking the port several times a second and collecting and parsing transmissions MOSTLY correctly. The problem is, the transmissions have the usual STX/ETX characters, but then INCLUDE a block check character which routinely spits out '\x0A' and breaks records or starts new lines in the text files. I can turn the BCC off, but then I worry about data fidelity. Any help or input is appreciated.you use STRIP() on a string to get rid of newlines. |
|