473,513 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: potential bug in UnixMailbox method of Python

Sirshendu Rakshit wrote:
Hi,

I am using UnixMailbox to parse an mbox file. This mbox file starts with
the following lines.

From qt***********@quicktopic.com Tue May 18 01:43:12 2004
>>From qt***********@quicktopic.com Tue May 18 01:43:12 2004
Return-Path: <qt***********@quicktopic.com>
X-Original-To: jm@localhost
Delivered-To: jm@localhost.jmason.org
....
...

Now what I am seeing is that the '>From qt***********@quicktopic.com
Tue May 18 01:43:12 2004' line is being returned as mail header by
UnixMailbox.
Which is not the case. I am not sure whether this is a bug in
UnixMailbox. Or is it not handled in Active Python 2.3.5.

The http://www.qmail.org/man/man5/mbox.html
link says that while reading a mbox the >From_line should be stripped off.

Please help me out.
I believe the difference between UnixMailbox and other types is that the
UnixMailbox is specifically designed to identify the gaps between
messages by the blank line and the "From ....". While this isn't
technically RFC 2822 format, it's useful to have the header. If you
don't want it you can always throw it away ...

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/

Nov 13 '08 #1
0 1077

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7066
by: Ruud de Jong | last post by:
The question I have is: how safe / future proof / portable is the use of the __subclasses__ method that exists for new-style classes? Background: I thought I had found an easy-to-understand...
9
2743
by: Lenard Lindstrom | last post by:
I was wondering if anyone has suggested having Python determine a method's kind from its first parameter. 'self' is a de facto reserved word; 'cls' is a good indicator of a class method ( __new__...
18
3246
by: Karl Pech | last post by:
Hi, I got a task there I have to compute pi using the Method above. So I wrote the following program: --- import random import math
31
2885
by: Chris S. | last post by:
Is there a purpose for using trailing and leading double underscores for built-in method names? My impression was that underscores are supposed to imply some sort of pseudo-privatization, but would...
27
3868
by: Mark | last post by:
I'm curious to get feedback regarding the potential SVG has in performing the same functionality as PDF for fixing documents. Thanks. Mark
4
1405
by: Brian van den Broek | last post by:
Hi all, I know that this is something for which I could (keep) STFW, but I'm mostly ignorant of the subject area and under a bit of a deadline. So I hope people won't mind if I truncate my...
21
1670
by: Agustin Villena | last post by:
Hi! is there anyway to show the class of a method in an exception's traceback? For example, the next code class Some(object): def foo(self,x): raise Exception(x)
13
2712
by: Hussein B | last post by:
Hi, I'm familiar with static method concept, but what is the class method? how it does differ from static method? when to use it? -- class M: def method(cls, x): pass method =...
8
2597
by: Fuzzyman | last post by:
Hello all, I may well be being dumb (it has happened before), but I'm struggling to fix some code breakage with Python 2.6. I have some code that looks for the '__lt__' method on a class: ...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7523
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1592
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.