-
-
Save salekseev/e823e3783221f6c49f82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import msgpack | |
| import sys | |
| try: | |
| while True: | |
| line = sys.stdin.readline().strip('\n') | |
| try: | |
| print msgpack.unpackb(line) | |
| except (TypeError, ValueError, msgpack.exceptions.UnpackValueError, | |
| msgpack.exceptions.ExtraData): | |
| print line | |
| except KeyboardInterrupt: | |
| pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment