1
2
3
4
5
6
7
8
9
10
11
12
13 | csmith@uptown:~$ cat test.yaml
truetest1: True
truetest2: On
truetest3: y
truetest4: YES
csmith@uptown:~$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> dd = yaml.load(open('test.yaml').read())
>>> dd
{'truetest4': True, 'truetest1': True, 'truetest3': 'y', 'truetest2': True}
|