Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Mohsen Akbari
--- I use notepad to view my txt file. It appears that way in this tool. --- Here is the output of the debug lines that you mentioned: print *line*.find('\n') -1 print len(*line*) 1528 print repr(line)

Re: Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Steve Holden
Mohsen Akbari wrote: Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's because the

Re: Fwd: Problem with writing a long line in a text file

2008-11-20 Thread Matthew Barnett
Steve Holden wrote: Mohsen Akbari wrote: Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's

Problem with writing a long line in a text file

2008-11-19 Thread Mohsen Akbari
Dear guys, I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. I thought maybe that's because the maximum possible length of the

Re: Problem with writing a long line in a text file

2008-11-19 Thread Joe Strout
On Nov 19, 2008, at 3:27 PM, Mohsen Akbari wrote: I'm a newbie in python and I have this problem with the code that I'm writing. There is a very long line which I wish to output it to a text file.But when I do this, in the output file, the result appears in two lines. Appears that way

Re: Problem with writing a long line in a text file

2008-11-19 Thread John Machin
On Nov 20, 9:31 am, Joe Strout [EMAIL PROTECTED] wrote: On Nov 19, 2008, at 3:27 PM, Mohsen Akbari wrote: I'm a newbie in python and I have this problem with the code that   I'm writing. There is a very long line which I wish to output it to   a text file.But when I do this, in the output