My First .py
Max M
maxm at mxm.dk
Thu Apr 18 04:11:37 EDT 2002
Bryce C. Mason wrote:
> I think I'll go get a book on how to let python retrieve information over
> the net. This would remove another step of him having to capture screen
> output. Anyone have a good suggestion for some examples of how python can
> manipulate network resources?
ahh you hardly need a book for just that :-)
But I would recommend "Learning Python" and the "Python Essential
Reference" Or the one By Frederik Lundh.
regards Max M
###########################
from urllib import urlopen
pythonOrg = urlopen('http://www.google.com')
content = pythonOrg.read()
pythonOrg.close()
print
content[content.find('<title>')+len('<title>'):content.find('</title>')]
>>> Google
More information about the Python-list
mailing list