append log file

Gary Herron gherron at
Tue Sep 30 02:00:09 CEST 2003

On Monday 29 September 2003 02:19 pm, Tom wrote:
> Gary Herron wrote:
> >Well ... A mode of "a" is the correct thing, abd it works just fine
> >for me.  So we need to know some other things to solve this problem.
> >
> >What platform?
> I am using windows.
> >Is the data ascii or binary? (If binary on win32, then you probably
> >need mode "ab" or some such)
> It is just ascii.
> >Exactly what do you mean by "messed up"?
> The Data in the log file looks like this:
> ??0/000/000/000/000/000/00?0/00?0/000/000/000/000/000/000/000/000/00?
> Instead it should look like this:
> 1 1 0 0 0 0 0 0 1 0 1
> >Gary Herron
> I am confused.
> -Tom

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
So do this:
  print type(ErrorInfo)
  print `ErrorInfo`  # the back quotes are important here
before you write it out and tell us the results.

I think you'll find that the contents of ErrorInfo is not a string
filled with only printable ascii characters.

Gary Herron

More information about the Python-list mailing list