[muscle] Re: Small error in python Message.py

  • From: "Jeremy Friesner" <jaf@xxxxxxxxxxxx>
  • To: "David RENE" <david.rene@xxxxxxx>
  • Date: Fri, 12 Jan 2007 07:27:43 PST (-0800)

Hi David,

Thanks for the info, I will look into fixing that today.


ps if you come up with a good Anubis API for muscle, feel free to submit it... 
my goal is to have muscle come with support for as many languages as possible 

> Hi, 
> I'm working on port of the message interface to the Anubis Language
> (www.anubis-language.com). For testing my work I used the python message.py
> for generating message into file and test my implementation in Anubis. But
> when I read the generated file I had some troubles for decoding the content
> of that file. But when I receive the message from network, all is right.
> I looked the python sources and I found that is due to opening and reading
> mode of the file. With 'w' mode an extra CR is add when python see an LF
> (10). That 10 are meeting when python save the "stringme!", which has a size
> of 9 + 1 for null char.
> The test was correct because extra add CR was remove during the reading, but
> the file is not binary message.
> outfile = open('test.msg', 'w')  instead of  outfile = open('test.msg',
> 'wr')
> infile = open('test.msg', 'r')   instead of  infile = open('test.msg', 'rb')
> If you can fix that small bug, it will be useful for everyone who wants to
> use that file as basis of work.
> Thank you very much
> Regards.
> David RENE

Other related posts: