Skip to content

Instantly share code, notes, and snippets.

@jfinstrom
Created September 25, 2015 21:47
Show Gist options
  • Select an option

  • Save jfinstrom/2b86f2e44407859a6c1b to your computer and use it in GitHub Desktop.

Select an option

Save jfinstrom/2b86f2e44407859a6c1b to your computer and use it in GitHub Desktop.
Parsing module xml in python
#!/usr/bin/env python
import sys
import xml.etree.ElementTree as ET
tree = ET.parse(sys.argv[1])
root = tree.getroot()
version = root.find('version').text
description = root.find('description').text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment