Commit 50540219 authored by Sven Gestegård Robertz's avatar Sven Gestegård Robertz
Browse files

Merge branch 'master' into 2006: python encode example

parents f0710bb4 bc52d70a
import labcomm
import sys
import simple
if __name__ == '__main__':
encoder = labcomm.Encoder(labcomm.StreamWriter(open(sys.argv[1], 'w')))
foo = simple.theTwoInts()
foo.a = 13
foo.b = 37
encoder.encode(foo, simple.theTwoInts.signature)
bar = simple.IntString()
bar.x = 1742
bar.s = "A string from Python"
encoder.encode(bar, simple.IntString.signature)
......@@ -7,6 +7,10 @@ echo
java -cp .:../../lib/java:gen Encoder encoded_data
./example_decoder encoded_data
PYTHONPATH=../../lib/python:gen ./ encoded_data
java -cp .:../../lib/java:gen Decoder encoded_data
./example_encoder encoded_data
java -cp .:../../lib/java:gen Decoder encoded_data
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment