The Wayback Machine - https://web.archive.org/web/20230717010331/http://qbnz.com/highlighter/
| |
|
HomeNewsExamplesDemoDownloadsFAQDocumentationMailing ListsLicense
|
|
1:03 am GMT
GeSHi - Generic Syntax Highlighter
Latest News
News Archive
|
Random Screenshot
Demonstration
Runtime Example
try:
req = Request(theurl, txdata, txheaders) # create a request object
handle = urlopen(req) # and open it to return a handle on the url
except IOError, e:
print 'We failed to open "%s".' % theurl
if hasattr(e, 'code'):
print 'We failed with error code - %s.' % e.code
else:
print 'Here are the headers of the page :'
print handle.info() # handle.read() returns the page, handle.geturl() returns the true url of the page fetched (in case urlopen has followed any redirects, which it sometimes does)
|
|