Skip to content

Instantly share code, notes, and snippets.

@ramalho
Last active May 1, 2017 01:29
Show Gist options
  • Select an option

  • Save ramalho/832432103b094401202d89a9b2808076 to your computer and use it in GitHub Desktop.

Select an option

Save ramalho/832432103b094401202d89a9b2808076 to your computer and use it in GitHub Desktop.
Simple script to display Gnome 3 version
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
tags = 'platform minor micro'.split()
doc = ET.parse('/usr/share/gnome/gnome-version.xml')
print('.'.join(doc.find(tag).text for tag in tags))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment