[Tutor] Problem with "yaml load"
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
> see if I can eliminate the temporary file and import the data
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!
Author of the Learn to Program web site
More information about the Tutor