Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2@file 

3@brief Puts everything related to package :epkg:`yaml` in a separate files. 

4""" 

5import yaml 

6try: 

7 from yaml import FullLoader as Loader 

8except ImportError: # pragma: no cover 

9 Loader = None 

10 

11 

12def yaml_load(content): 

13 """ 

14 Parses a :epkg:`yml` file with :epkg:`yaml`. 

15 

16 @param content string 

17 @return structured data 

18 """ 

19 if Loader is None: 

20 return yaml.load(content) # pragma: no cover 

21 return yaml.load(content, Loader=Loader)