Pop and forms and retrieve methods???

Akhar akhar at videotron.ca
Sun Mar 19 03:49:18 EST 2000


Thanks for the pointers they really help. But I've stumbled upon another
problem that I cannot understand: I use the Cookie.py module and the cgi.py
module to for Cookie.py store the login and password for future retrieval
and the cgi.py to use with forms that give out the id of the message I want
to view. I have a link that looks like http://localhost/mail.py?id=2 and
then I use the
try:
                form = cgi.FieldStorage()
                LField = form["ogin"]
                PField = form["pwd"]
 try:
                form = cgi.FieldStorage()
                DField = form["id"]
                li = DField.value
finally:
msd = pop.retrieve(li)
only to get:
Traceback (innermost last):
  File "/var/www/cgi-bin/mail/msg.py", line 42, in ?
    msd = pop.retrieve(li)
  File "/usr/local/lib/python1.5/pop.py", line 304, in retrieve
    data = self.command("RETR %d" % msg)
TypeError: illegal argument type for built-in operation
I thought at first since my variable was called ID would be conflicting with
the module but li seems pretty random? What is happening? I also thought it
might be because the DField.value was incorect but it generates a number and
not a phrase.
Regards,
Akhar





More information about the Python-list mailing list