Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # İsa Mert GÜRBÜZ <isamertgurbuz@gmail.com>
- # isamert.wordpress.com
- class distribution:
- def getvalue(self, x):
- file = open("/etc/lsb-release", 'r')
- rd = file.read().strip()
- file.close()
- lines = rd.split("\n")
- dd = dict((key, value) for key, value in (line.split('=') for line in lines))
- return dd[x]
- def name(self):
- return self.getvalue("DISTRIB_ID")
- def relase(self):
- return self.getvalue("DISTRIB_RELEASE")
- def codename(self):
- return self.getvalue("DISTRIB_CODENAME")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement