python 2.2.3, I the directory is configure to use mod publisher for all documents called from it.
test.py
Code:
def getwebpage(req,**arg):
import httplib
conn = httplib.HTTPConnection("www.python.org")
conn.request("GET", "/index.html")
r1 = conn.getresponse()
return r1.status
test.html
<html>
<FORM action="/draft/htmlRead.py/getwebpage" method="POST">
<input type="submit" value="Login" style="width:100px; font-family:verdana; font-size:10px">
</FORM>
</html>
The errror I get is....
Mod_python error: "PythonHandler mod_python.publisher"
Traceback (most recent call last):
File "/usr/local/lib/python2.2/site-packages/mod_python/apache.py", line 332, in HandlerDispatch
result = object(req)
File "/usr/local/lib/python2.2/site-packages/mod_python/publisher.py", line 198, in handler
result = apply(object, (), args)
File "/usr/local/apach2/htdocs/draft/htmlRead.py", line 5, in getwebpage
conn = httplib.HTTPConnection("www.python.org")
AttributeError: 'module' object has no attribute 'HTTPConnection'
I cant figure this out, I have a full fantasy sports app working and lots of function calls, never had this problem..
Im stumped
penn