Created
March 18, 2020 15:15
-
-
Save pat1/e80377dbd7b934f66bbfcc68cf3f048f 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
import dballe | |
import sys | |
importer = dballe.Importer("JSON") | |
exporter = dballe.Exporter("BUFR") | |
inputfile = sys.stdin | |
with importer.from_file(inputfile) as fp: | |
for msgs in fp: | |
for msg in msgs: | |
sys.stdout.buffer.write(exporter.to_binary(msg)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment