help with yaml.dump
Mr.SpOOn <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I'm using yaml with Python and I need to create a yaml file with
alphabet letters and a corresponding coding.
I'd like to have an output like this:
a: 00000
b: 00001
...
and so on.
I wrote this:
for i in alfabeto:
yaml.dump({i : gmpy.digits(interi,2).zfill(5)}, stream)
but what I get is:
{a: '10110'}
{b: '10110'}
{c: '10110'}
...
Why does it print the parenthesis { } and apexes ' ' ?
Thanks, bye.
Carlo
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/