[sugar] Data Transport between nodes
Benjamin M. Schwartz
Tue Oct 2 17:43:41 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
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.
This is a dangerous suggestion, but you may want to look at the source code for
my Acoustic Measure activity:
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the Sugar-devel