一、安装PyYAML
二、入门参考
http://www.cnblogs.com/c9com/archive/2013/01/05/2845539.html
http://my.oschina.net/jk409/blog/317759
三、实例
#!/usr/bin/env python import yaml f=open("test.yml"); x=yaml.load(f); print x['ssl']['site_cert']['rsa']['key']; f.close();
运行