append log file

Tom llafba_NOSPAM_ at gmx.net
Tue Sep 30 04:46:37 EDT 2003


Gary Herron wrote:

>I don't believe it is ascii.  The line (shown above) is extremely
>garbled, but it looks like a binary (or unicode) string garbled as it
>passes through you mail client while sending and my mail client while
>reading.
>       
>
Now it starts getting really weird. :-)
If I append my error info once to my log file, I can read it. If I 
append the same info twice to my log file it is garbled up like I 
discribed earlier. If I append it three times, I can rad it again. Well 
this is something I absolutely don't understand anymore. :-)
But it also looks like it is not neccessarily a python problem, because 
I also found out, that I only have problems viewing it if I view it with 
the Windows Text Editor. Then I tried to view it with Ultra Edit because 
I knew that it should work! And with Ultra Edit everything looked fine! 
I didn't expect these kind of problems with the windows editor because I 
never had problems before, but it looks like this is the source of the 
problem. Even though I don't understand why it just sometimes has this 
problem.

>So do this:
>  print type(ErrorInfo)
>and 
>  print `ErrorInfo`  # the back quotes are important here
>before you write it out and tell us the results.
>  
>
It is a string and the print out looks exactly like the one I want and 
sometimes even get. It consists of '0', '1', '2' and 'whitespace' only

>I think you'll find that the contents of ErrorInfo is not a string
>filled with only printable ascii characters.
>
>Gary Herron
>
Thanky for your help,
Tom





More information about the Python-list mailing list