HTTP GET Explodes...

John Machin sjmachin at lexicon.net
Sun Sep 24 08:59:13 CEST 2006


Pete wrote:
> > > Python 2.4.3 (#1, Jun 13 2006, 11:46:08)
> > > [GCC 4.1.1 20060525 (Red Hat 4.1.1-1)] on linux2
> > > Type "help", "copyright", "credits" or "license" for more information.
> > > >>> import httplib
> > > >>> conn = httplib.HTTPConnection("www.python.org")
> > > >>> conn.request("GET", "/index.html")
> > > Hello World.
> >
> >       Off-hand -- I'd suggest you do a search of your computer for any
> > occurrence of
> >       httplib.py
> >       httplib.pyc
> >       httplib.pyo
> > on the odd chance that you are picking up some corrupted version...
>

Don't search; just open the lid and read the label that's tied around
the culprit's neck; example:

| >>> import httplib
| >>> httplib.__file__
| 'c:\\python24\\lib\\httplib.pyc'

If you want to see where it finds *everything* that's imported, run
Python with the -v arg.
If you want to see where it looks for each module imported, use -vv
(that's vee vee, not dubya).

HTH,
John

HTH,
John




More information about the Python-list mailing list