slow joinings of strings

Paul Robinson paul.robinson at businesscollaborator.com
Tue Jan 30 08:08:37 EST 2001


Karol Bryd wrote:
> 
> Carsten Gaebler <cg at schlund.de> writes:
> 
> > This should be faster:
> >
> > s = open(file, 'r').read()
> 
> Ok, this works fine as long as I want to read whole file at once,
> but in my case, unfortunately, I need to read file part by part
> (the file is RFC822 message, and I want to extract some MIME parts
> from it).

The other messages in the thread give you some tips on making this
construct faster - but if you trying to do rfc822/MIME parsing then I'd
have a look at the rfc822 and mimetools modules.

Paul Robinson
Business Collaborator Development Manager
Enviros Software Solutions
WWW: http://www.businesscollaborator.com




More information about the Python-list mailing list