|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Cant get httplib working through mod python
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 |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Cant get httplib working through mod python |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|