Saving Numeric arrays to file?

Duncan Smith buzzard at urubu.freeserve.co.uk
Sat Sep 27 11:58:43 EDT 2003


"Alex Martelli" <aleax at aleax.it> wrote in message
news:GLhdb.178998$R32.5726980 at news2.tin.it...
> Duncan Smith wrote:
>    ...
> > What I
> > *would* like is a reasonably generic (and not terribly inefficient)
> > solution for
> > storing strings that contain escape characters in text files.  Cheers.
>
> I'm not quite sure what you mean by "contain escape characters" in this
> context.  But maybe the quoted-printable coding is what you're looking
> for?  See module quopri in the standard Python library.
>
>
> Alex
>

Thanks Alex,
                   I was writing to file strings such as
'\n\x00\x00\x00\x00\x00\x00\x00' and then trying to retrieve them via
readline().  It turns out that querying a MySQL table is easily quick enough
for my purposes (the bottlenecks are elsewhere).  But I'll certainly check
out quopri (seeing as I wasn't aware of it).  Thanks again.

Duncan






More information about the Python-list mailing list