On Wed, Jun 30, 2010 at 9:42 AM, Antoine Pitrou wrote:
> On Tue, 29 Jun 2010 20:05:29 -0400
> "R. David Murray" wrote:
>>
>> I would imagine Guido is talking about an io.TextIOWrapper...in other
>> words, take the binary file you've just finished grabbing info
>> from, and reread it as a text fil
On Tue, 29 Jun 2010 20:05:29 -0400
"R. David Murray" wrote:
>
> I would imagine Guido is talking about an io.TextIOWrapper...in other
> words, take the binary file you've just finished grabbing info
> from, and reread it as a text file in order to grab the actual
> message content.
This sounds a
R. David Murray wrote:
> On Tue, 29 Jun 2010 17:02:14 -0400, Steve Holden wrote:
>> Guido van Rossum wrote:
>>
>>> - wrap the binary stream in a text stream
>> "wrap" how? The ultimate destiny of the text is twofold:
>
> I would imagine Guido is talking about an io.TextIOWrapper...in other
> word
R. David Murray wrote:
> On Tue, 29 Jun 2010 13:54:09 -0400, Steve Holden wrote:
>> A.M. Kuchling wrote:
>>> But should mailboxes really be opened in a UTF-8 encoding, or should
>>> they be treated as 7-bit text? I'll have to think about this.
>> Neither! You can't open them as 7-bit text, becaus
On Tue, 29 Jun 2010 17:02:14 -0400, Steve Holden wrote:
> Guido van Rossum wrote:
>
> > - wrap the binary stream in a text stream
>
> "wrap" how? The ultimate destiny of the text is twofold:
I would imagine Guido is talking about an io.TextIOWrapper...in other
words, take the binary file you've
On Tue, 29 Jun 2010 13:54:09 -0400, Steve Holden wrote:
> A.M. Kuchling wrote:
> > But should mailboxes really be opened in a UTF-8 encoding, or should
> > they be treated as 7-bit text? I'll have to think about this.
>
> Neither! You can't open them as 7-bit text, because real-world email
> doe
Guido van Rossum wrote:
> It should probably be opened in binary mode. Binary files do have a
> .readline() method (returning a bytes object), and bytes objects have
> a .startswith() method. The tell positions computed this way are even
> compatible with those used by the text file. So you could d
It should probably be opened in binary mode. Binary files do have a
.readline() method (returning a bytes object), and bytes objects have
a .startswith() method. The tell positions computed this way are even
compatible with those used by the text file. So you could do it this
way:
- open binary st
A.M. Kuchling wrote:
> On Tue, Jun 29, 2010 at 11:40:50AM -0400, Steve Holden wrote:
>> I will leave the profiler output to speak for itself, since I can find
>> nothing much to say about it except that there's a hell of a lot of
>> decoding going on inside mailbox.iterkeys().
>
> The problem is a
On Tue, 29 Jun 2010 12:52:28 -0400
"A.M. Kuchling" wrote:
>
> But should mailboxes really be opened in a UTF-8 encoding, or should
> they be treated as 7-bit text? I'll have to think about this.
I don't see how you can assume UTF-8 for mailbox files, given that each
message will have its partic
On Tue, 29 Jun 2010 18:34:22 +0200, Antoine Pitrou wrote:
> On Tue, 29 Jun 2010 11:40:50 -0400
> Steve Holden wrote:
> > Sure. I attach the outputs of both files, as well as the program and the
> > data. With profiling (python -m cProfile test3.py) the run took less
> > than a third of a second u
On Tue, Jun 29, 2010 at 11:40:50AM -0400, Steve Holden wrote:
> I will leave the profiler output to speak for itself, since I can find
> nothing much to say about it except that there's a hell of a lot of
> decoding going on inside mailbox.iterkeys().
The problem is actually in _generate_toc(), wh
On Tue, Jun 29, 2010 at 07:56:22AM -0700, Guido van Rossum wrote:
> Since you have such a great reproducible test case, could you point
> the profiler at it? (Perhaps on a reduced dataset... The profiler
> multiples your run time by some number between 2 and 10 IIRC.)
Let me underline Guido's sugg
On Tue, 29 Jun 2010 11:40:50 -0400
Steve Holden wrote:
> Sure. I attach the outputs of both files, as well as the program and the
> data. With profiling (python -m cProfile test3.py) the run took less
> than a third of a second under 2.5, and 168 seconds under 3.1. I'd say
> that was problematical
On 29/06/2010 15:51, Tim Golden wrote:
On 29/06/2010 15:26, Steve Holden wrote:
Nick Coghlan wrote:
Command line: ./python -m test.regrtest -v test_mailbox
trunk: Ran 274 tests in 25.239s
py3k: Ran 268 tests in 26.263s
So I don't see any substantial difference on a Kubuntu 10.04 box (both
bui
On Tue, Jun 29, 2010 at 7:49 AM, Steve Holden wrote:
> Steve Holden wrote:
>> Nick Coghlan wrote:
>>> Command line: ./python -m test.regrtest -v test_mailbox
>>>
>>> trunk: Ran 274 tests in 25.239s
>>> py3k: Ran 268 tests in 26.263s
>>>
>>> So I don't see any substantial difference on a Kubuntu 10
On 29/06/2010 15:26, Steve Holden wrote:
Nick Coghlan wrote:
Command line: ./python -m test.regrtest -v test_mailbox
trunk: Ran 274 tests in 25.239s
py3k: Ran 268 tests in 26.263s
So I don't see any substantial difference on a Kubuntu 10.04 box (both
builds are recent'ish, but not completely u
Steve Holden wrote:
> Nick Coghlan wrote:
>> Command line: ./python -m test.regrtest -v test_mailbox
>>
>> trunk: Ran 274 tests in 25.239s
>> py3k: Ran 268 tests in 26.263s
>>
>> So I don't see any substantial difference on a Kubuntu 10.04 box (both
>> builds are recent'ish, but not completely up t
Nick Coghlan wrote:
> Command line: ./python -m test.regrtest -v test_mailbox
>
> trunk: Ran 274 tests in 25.239s
> py3k: Ran 268 tests in 26.263s
>
> So I don't see any substantial difference on a Kubuntu 10.04 box (both
> builds are recent'ish, but not completely up to date).
>
> However, the
Command line: ./python -m test.regrtest -v test_mailbox
trunk: Ran 274 tests in 25.239s
py3k: Ran 268 tests in 26.263s
So I don't see any substantial difference on a Kubuntu 10.04 box (both
builds are recent'ish, but not completely up to date).
However, the underlying IO access is significantly
On Tue, Jun 29, 2010 at 09:56:11AM -0400, Steve Holden wrote:
> Can someone who is set up to do easily just do a timing of test_mailbox
> under 2.6 and 3.2, to verify they see the same disparity as me? The test
Actually, No.
Python 2.7b2+ (trunk:81685M, Jun 4 2010, 21:52:06)
Ran 274 tests in 27
Hello Steve,
> Can someone who is set up to do easily just do a timing of test_mailbox
> under 2.6 and 3.2, to verify they see the same disparity as me? The test
> takes about twice as long under 3.1 here
On Ubuntu timing was:
Python 2.6.5: 23.8sec
Python 2.7rc2: 32.7sec
Python 3.1.2: 32.3sec
I hope this is an appropriate dev topic.
It seems to me that the unicode discussions of recent days are well
highlighted by difficulties I am having using the mailbox module (hardly
surprising given the difficulties of handling email generally) even
though it passes its tests.
I can't find anythi
23 matches
Mail list logo