2 Oct 23:43
Re: Data Transport between nodes
Benjamin M. Schwartz <bmschwar <at> fas.harvard.edu>
2007-10-02 21:43:41 GMT
2007-10-02 21:43:41 GMT
Erik Blankinship wrote: > How would you change the HelloMesh example to send binary data or an > object? Could you post a diff? That would be useful for a reference. > Thanks! This is a dangerous suggestion, but you may want to look at the source code for my Acoustic Measure activity: http://dev.laptop.org/git?p=projects/acoustic-measure-activity;a=summary My code is directly based on HelloMesh, but I needed to send binary data over the Tube. The answer to your question specifically is basically one word: base64. Python has a base64 module providing b64encode and b64decode functions. I used these to send arbitrary bytes over the Tube, which only supports utf8. --Ben
RSS Feed