find first occurrence of ONE string in ONE or MORE mailing lists....PAM!

In [4]:
from bigbang.archive import load as load_archive

In [5]:
#insert ONE OR MORE urls of mailing lists
urls = ["",

    arch_paths =[]
    for url in urls:
    archives = [load_archive(arch_path).data for arch_path in arch_paths]
    arch_paths =[]
    for url in urls:
    archives = [load_archive(arch_path).data for arch_path in arch_paths]

In [11]:
checkword = 'Freedom of expression'

In [25]:
def get_first_occurrence(word,mailing_list):
    for mail in mailing_list.iterrows():
        if str.lower(word) in str.lower(mail[1]["Body"]):
            return mail

In [26]:
for i in range(0,len(archives)):
    first_mail = get_first_occurrence(checkword, archives[i])
    print urls[i]
    print first_mail[1]["Date"]
    print first_mail[1]["From"]
    print first_mail[1]["Body"]
    print "****************************************************************"
2002-06-26 21:38:13
CCHIU at (Chris Chiu)
A report entitled Success by Default suggests, among other things, that
several changes should be made in the UDRP to protect freedom of expression
online. For example, the study recommends that the "standards for a finding
of 'confusing similarity' to a trademark" should be clarified, and that
"[d]omain names "that signal criticism, parody, or commentary upon products
or companies ... should not be classified as 'confusing' unless they are
used in ways that actively promote fraud, deception or confusion." Success
by Default is based on information contained in a special UDRP case tracking
database, both of which were created by the Convergence Center of Syracuse


Christopher Chiu
Global Internet Liberty Campaign Organizer
American Civil Liberties Union
2015-08-06 19:34:47
gregshatanipc at (Greg Shatan)
I really don't think using a 500 year old colloquialism "cheapens the
discussion."  I also find it ironic to find this admonition in a discussion
about, inter alia, freedom of expression.  Political correctness, trigger
words, and other such stuff are a not inconsequential threat to freedom of
expression and freedom of ideas -- starting with a kernel of good
intentions, and then becoming quite damaging....

On Thu, Aug 6, 2015 at 3:05 PM, Avri Doria <avri at> wrote:

> On 06-Aug-15 14:28, Greg Shatan wrote:
> > Otherwise, we are just buying a pig in a poke.
> I really have trouble with such a reference to human rights.  Please do
> not cheapen this discussion.
> avri
> ---
> This email has been checked for viruses by Avast antivirus software.
> _______________________________________________
> Wp4 mailing list
> Wp4 at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

In [ ]: