This is from RHEL distgit tests/PyYAML, directory Sanity/Smoke. The original commit hash: fd668cd6d20ca9c46d9bfa5ccf34f3a925317b25 Only necessary files were kept. Co-Authored-By: Lukas Zachar <lzachar@redhat.com> Co-Authored-By: Miro Hrončok <miro@hroncok.cz>
14 lines
178 B
Python
14 lines
178 B
Python
#!/usr/bin/env python
|
|
import yaml
|
|
documents = """
|
|
---
|
|
name: foo
|
|
---
|
|
name: bar
|
|
---
|
|
name: foobar
|
|
"""
|
|
|
|
for data in yaml.load_all(documents, Loader=yaml.SafeLoader):
|
|
print(data)
|