Questions tagged [pyyaml]

PyYAML is a YAML 1.1 parser and emitter for Python. Use this tag for PyYAML specific python questions.

PyYAML is a parser/dumper for YAML 1.1 for the Python programming language.

PyYAML does not yet implemented the feature changes from the YAML 1.2 specification released in 2009.

See http://pyyaml.org/wiki/PyYAML for background and documentation.

Source code: https://github.com/yaml/pyyaml

828 questions
-3
votes
1 answer

How do I rename a key with PyYAML

I have loaded a YAML file (template) that I want to modify (keys and some values). e.g. key_to_rename: a: "1" b: "2" c: "3" How do I find & rename a key with PyYAML? my_dict = yaml.load(stream) for key, value in my_dict.iteritems(): …
zabumba
  • 12,172
  • 16
  • 72
  • 129
-4
votes
0 answers

How do I install PyYAML and why is it giving this "SyntaxError: invalid syntax" error?

I need to install PyYAML for a program but I get an error whenever I try to install it. When I type pip install yaml or pip install PyYAML into the Python 2.6 command line, it gives me this error: File "", line 1 pip install yaml …
-6
votes
1 answer

Parsing yaml python

There is a file in yaml markup a: b:x test2 test test3 How to use python (2.7.x) and PyYAML get x?
1 2 3
55
56