@open_file(0, mode='r')
def read_yaml(path):
 try:
  import yaml
 except ImportError:
  raise ImportError('read_yaml() requires PyYAML: http://pyyaml.org/')
 G = yaml.load(path)
 return G

@ open_file ( 0 , mode = 'r' ) def read_yaml ( path ) : try : import yaml except ImportError : raise ImportError ( 'read_yaml() requires PyYAML: http://pyyaml.org/' ) G = yaml . load ( path ) return G
read graph in yaml format from path .