Re: YAML (was: Python and Ruby)

2010-02-05 Thread Steven D'Aprano
On Fri, 05 Feb 2010 09:22:03 -0500, Lou Pecora wrote: [...] >> > That's what I needed. 3 lines to write or read a inhomogeneous >> > collection of variables. >> >> Easy, but also quick and dirty -- good enough for small scripts, but >> not really good enough for production applications. [...] >

Re: YAML (was: Python and Ruby)

2010-02-05 Thread Lou Pecora
In article <00f4bb3a$0$15566$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > On Thu, 04 Feb 2010 09:57:59 -0500, Lou Pecora wrote: > > > Well, that looks a bit more complicated than I would like, but maybe > > it's doing more stuff than I can grok. Here's what I needed and how I > > did i

Re: YAML (was: Python and Ruby)

2010-02-04 Thread Steven D'Aprano
On Thu, 04 Feb 2010 09:57:59 -0500, Lou Pecora wrote: > Well, that looks a bit more complicated than I would like, but maybe > it's doing more stuff than I can grok. Here's what I needed and how I > did it in Python: [...] > # Reading same list in: > instr=fp.readline() > inlist=eval(instr) > x1,

Re: YAML (was: Python and Ruby)

2010-02-04 Thread Lou Pecora
In article <87eil1ddjp.fsf...@castleamber.com>, John Bokma wrote: > Lou Pecora writes: > > > That's a pretty accurate description of how I transitioned to Python > > from C and Fortran. > > Not C, but C++ (but there are also C implementations): YAML, see: > http://code.google.com/p/yaml-cpp/

YAML (was: Python and Ruby)

2010-02-03 Thread John Bokma
Lou Pecora writes: > That's a pretty accurate description of how I transitioned to Python > from C and Fortran. Not C, but C++ (but there are also C implementations): YAML, see: http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument I use YAML now and then with Perl for both reading/writin