Created
August 14, 2018 17:27
-
-
Save robbyt/1658d7642fac4f5dc87b0253a5ad28ee to your computer and use it in GitHub Desktop.
This file contains 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 yaml | |
import pprint | |
def main(args): | |
if len(args) >= 2: | |
for i in args[1:]: | |
s = open(i).read() | |
pprint.pprint(yaml.load(s)) | |
else: | |
print("Error, please pass one or more yaml files to parse") | |
if __name__ == "__main__": | |
import sys | |
main(sys.argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment