PyYAML package in Pythonista
I'm trying to write a basic script that converts YAML to JSON.
By searching this forum, it seems like Editorial has the YAML package built-in, but NOT in Pythonista. Is that correct?'
I've tried importing YAML and also trying a my_dict = yaml.load() command in Pythonista, but they are not recognized.
Finally, is it possible to concert YAML to JSON if I were to buy Editorial?
@atonaltensor try in lowercase
and an example here
import yaml document = """ a: 1 b: c: 3 d: 4 """ print(yaml.dump(yaml.load(document)))
I can't actually be sure why it wasn't working on my first try, but it is now. Thanks.
>>> import yaml >>> yaml.__version__ '3.11'