RE: [sqlite] Stripping a newline character
Please forgive my idiocy. I was more tired than I thought. First, I posted this message to the wrong mailing list (I wanted a Python list), and second, I made a dumb, silly assumption about how the method worked. RobR - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stripping a newline character
On 9/5/06, Rob Richardson <[EMAIL PROTECTED]> wrote: Greetings! I am using a serial communications package that includes a readline() method to talk to a bar-code scanner. Readline() gives me a string whose last character is a newline ('\n'). I am trying to get rid of the newline. MyString.strip('\n') isn't working. It has no effect. How should I do this? It seem you pushed the wrong button, but every barcode scanner I worked with (though I'm certain there are much more different types out there) had a way to configure the output. So you can just program the scanner to not send the terminating '\n' (with PS/2 scanners wich "attach" between the keyboard and the PC I used other function to add a prefix for the code - like 0x02 [STX] - so I could easily distinguish codes originated from the scanner and the real keyboard). Anyway, it seems trivial to just ignore that last '\n'... Regards, ~Nuno Lucas - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Stripping a newline character
What language are you using? Rob Richardson wrote: Greetings! I am using a serial communications package that includes a readline() method to talk to a bar-code scanner. Readline() gives me a string whose last character is a newline ('\n'). I am trying to get rid of the newline. MyString.strip('\n') isn't working. It has no effect. How should I do this? Thanks very much! Rob Richardson RAD-CON INC. - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Stripping a newline character
Greetings! I am using a serial communications package that includes a readline() method to talk to a bar-code scanner. Readline() gives me a string whose last character is a newline ('\n'). I am trying to get rid of the newline. MyString.strip('\n') isn't working. It has no effect. How should I do this? Thanks very much! Rob Richardson RAD-CON INC.