Last active
May 1, 2017 01:29
-
-
Save ramalho/832432103b094401202d89a9b2808076 to your computer and use it in GitHub Desktop.
Simple script to display Gnome 3 version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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