We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
| import lxml.etree | |
| def pprint(elem): | |
| print lxml.etree.tostring(elem, pretty_print=True) | |
| class Bind(object): | |
| def __init__(self, path, converter=None, first=False): | |
| ''' | |
| path -- xpath to select elements | |
| converter -- run result through converter | |
| first -- return only first element instead of a list of elements |