[Tutor] Problem with "yaml load"

Alan Gauld alan.gauld at btinternet.com
Mon Dec 13 21:11:41 CET 2010

"Sean Carolan" <scarolan at gmail.com> wrote

> a python dictionary.  I am able to do this by dumping my data into a
> temporary file and then importing it with yaml.load.  I would like 
> to
> see if I can eliminate the temporary file and import the data
> directly.

You could use a stringIO buffer. It acts like an in-memory file.
Of course your data needs to fit in memory to use that!


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list