Skip to content

Instantly share code, notes, and snippets.

@yangsu
Created August 13, 2013 23:19
Show Gist options
  • Select an option

  • Save yangsu/6226666 to your computer and use it in GitHub Desktop.

Select an option

Save yangsu/6226666 to your computer and use it in GitHub Desktop.
import sys
import Event_pb2
event = Event_pb2.Event()
if len(sys.argv) != 2:
print 'Usage:', sys.argv[0], 'datafile'
sys.exit(-1)
f = open(sys.argv[1], 'rb')
event.ParseFromString(f.read())
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment