POP and pop.py and/or poplib

Akhar akhar at videotron.ca
Wed Mar 8 23:45:01 CET 2000

I am trying to write a front in html for my POP server so I can do stuff
like on Hotmail, so I tried using pop.py but when I try to use the top
command it stalls and sits there forever! also I am not able to print a
correct email they are missing some line or are not properly formatted
the same thin goes for poplib.py but it doesn't have the top function. Also
all the example on the internet do not work ! (though I didn't try the ones
that included deletion :))
here some of my code:

import cgi
import string
#import pop
from pop import POP
#from poplib import POP
pop =  POP('localhost')
n,b = pop.status()
n = len(pop)
p = pop.retrieve
print "Vous avez, "
qte =  len(pop)
print qte
print "message(s)! Dont(1) "
for id in range(1, len(pop)+1) :
        print id
        for line in pop.top(id, lines=1) :
                print line
for id in range(1, len(pop)+1) :
        print id
        for line in pop.retrieve(id) :
                print line
                print pop[id]
numMessages = len(pop)+1
print "messages:        (2)"
print numMessages
#print pop.status()

More information about the Python-list mailing list