Advertisement
BinaryJacob

yaml

Nov 25th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.30 KB | None | 0 0
  1. #!/usr/bin/env python2.7
  2. import yaml
  3.  
  4. def ip():
  5.     try:
  6.         with open("ecs.yml") as stream:
  7.             data=yaml.load(stream)
  8.             location=["east","west"]
  9.             for value in data["us-east-1"]:
  10.                 print(value)
  11.     except yaml.YAMLError as exc:
  12.         print(exc)
  13. ip()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement