BluShift
July 18th, 2009, 06:39 AM
I posted this earlier but mysteriously got NO REPLIES. So I'll word it a little differently:
Whenever I write the contents of a variable to a text file in Bash, it writes fine. When I write a variable to a text file in Python, it writes fine. Reading back the text file ALSO works. But when I read back a text file written from Bash, it ALWAYS has an extra newline character at the end.
I don't want to make this too long, for fear of not getting help, but I understand the idea of adding a comma (,) after the whatever.read() or whatever. But this complicates ALOT of things and I want to know if there is an easier fix. If you want to see the code I'm using I'd be more than happy to post. I just want to get SOMETHING in the way of help.
PLEASE HELP. :confused:
Whenever I write the contents of a variable to a text file in Bash, it writes fine. When I write a variable to a text file in Python, it writes fine. Reading back the text file ALSO works. But when I read back a text file written from Bash, it ALWAYS has an extra newline character at the end.
I don't want to make this too long, for fear of not getting help, but I understand the idea of adding a comma (,) after the whatever.read() or whatever. But this complicates ALOT of things and I want to know if there is an easier fix. If you want to see the code I'm using I'd be more than happy to post. I just want to get SOMETHING in the way of help.
PLEASE HELP. :confused: