| Python 2.2 für Einsteiger | ||
|---|---|---|
| <<< Previous | Einführung anhand von Beispielen | Next >>> |
#!/usr/bin/python
import httplib
h = httplib.HTTP('www.little-idiot.de')
h.putrequest('GET', '/index.html')
h.putheader('Accept', 'text/html')
h.putheader('Accept', 'text/plain')
h.endheaders()
errcode, errmsg, headers = h.getreply()
print errcode
f = h.getfile()
print f.read()
f.close()
| <<< Previous | Home | Next >>> |
| Übersetzer | Up | Primzahlen und Primfaktoren |