I use PyYAML to output the Python dictionary to YAML format:
import yaml d = { 'bar': { 'foo': 'hello', 'supercalifragilisticexpialidocious': 'world' } } print yaml.dump(d, default_flow_style=False)
Output:
bar: foo: hello supercalifragilisticexpialidocious: world
But I would like to:
bar: foo : hello supercalifragilisticexpialidocious : world
Is there a simple solution to this problem, even a suboptimal one?
source share