[mod_python] using httplib with mod python

Doug Gray dgray at coldstorage.com
Tue Mar 23 18:36:31 EST 2004

Python 2.2.3 running on Redhat Version 8.0


I cant get the example httplib from the python.org site to work through a
web application. It will work using python on linux but when I set up a
simple web page form to call a test.py file with a simple function I get an
error. AtrributeError: 'module' object has no attribute 'HTTPConnection'


Essential the test.py file  is this



Import httplib


Def testweb(req,**arg):

     conn = httplib.HTTPConnection(www.python.org <http://www.python.org/> )


     r1 = conn.getresponse()

     return r1.status




I call that file from a simple form with action =/test.py/getwebpage


Thanks for any help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.modpython.org/pipermail/mod_python/attachments/20040323/5cd05bdb/attachment.html

More information about the Mod_python mailing list