Windows binaries

One annoyance of using Python in a Windows environment is finding a really useful library only to find out you need to compile everything from source. Building from source is not a strong point of Windows.

A good resource is the Unofficial Windows Binaries for Python Extension Packages maintained by Christoph Gohlke. Chris has done the hard work compiling the libraries and creating an installer. All you have to do is run the correct version (there is often a version for each Python version and 32- and 64-bit versions).

I came across this page after looking at lxml.html. Once you have downloaded and installed the correct library you’ll be able to run the following script which displays all the links on the a page

import lxml.html
htmlpage = lxml.html.parse("")
for item in htmlpage.getiterator():
	if item.tag == "a":
		print "%s=%s" % (item.text,item.values())

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s