csv dictreader
Dravidan
yennes at gmail.com
Thu Mar 20 06:27:50 EDT 2008
It looks like the backslash is messing the whole thing up so I
reposted to try to find out how to get over the backslash hump.
On Mar 20, 2:08 am, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Wed, 19 Mar 2008 11:06:40 -0700 (PDT), brnstrmrs
> <brnstr... at gmail.com> declaimed the following in comp.lang.python:
>
> > my csv files looks like this:
>
> > Bytecode,Element
> > \x00\x00,0000
> > \x01\x00,0001
> > ....
> > \x09\x00,0009
>
> I sure hope your data is more complex than that... otherwise it's a
> waste of space...
>
> >>> for i in range(10):
> ... print i, repr(struct.pack("h", i))
> ...
> 0 '\x00\x00'
> 1 '\x01\x00'
> 2 '\x02\x00'
> 3 '\x03\x00'
> 4 '\x04\x00'
> 5 '\x05\x00'
> 6 '\x06\x00'
> 7 '\x07\x00'
> 8 '\x08\x00'
> 9 '\t\x00'
>
> And, \t is the same value \x09 (a tab character)
> --
> Wulfraed Dennis Lee Bieber KD6MOG
> wlfr... at ix.netcom.com wulfr... at bestiaria.com
> HTTP://wlfraed.home.netcom.com/
> (Bestiaria Support Staff: web-a... at bestiaria.com)
> HTTP://www.bestiaria.com/
More information about the Python-list
mailing list