get-a-cup-of-coffee slow (fwd)

Grant Griffin not.this at seebelow.org
Thu Aug 9 23:19:04 EDT 2001


Quinn Dunkan wrote:
> 
> On Thu, 09 Aug 2001 18:12:31 -0400, Lulu of the Lotus-Eaters <mertz at gnosis.cx>
> wrote:
> >Grant Griffin wrote:
> >|Also, I tried writing something like this with a list (which are presumably more
> >|suited to being appended), but then I realized that I didn't know how to write
> >|the contents of a list to a file as a stream of bytes.  There's probably a
> >|simple way to do that: what is it?
> >
> >''.join(lst)         # Python 2.0+
> >string.join(lst,'')  # Python 1.4+ (or something)
> 
> There is also file.writelines(lst).  It's not documented in my version of
> python, so maybe you're not supposed to use it, but why put it there then?
> It's been there for quite a while now.

OK, I think I've got it now.  The mistake I made in my last experiment
(in another post) was making a list of numbers rather than a list of
characters.

many-thanks-to-all-ly y'rs,

=g2
-- 
_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com



More information about the Python-list mailing list