Guest User

steaminf.py

a guest
Aug 24th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #!/usr/bin/python
  2. import re
  3. class steaminf:
  4. def __init__(self, steamfile):
  5. self.steamfile = open(steamfile)
  6. self.steaminfo = self.steamfile.read()
  7. self.steaminfo = self.steaminfo.replace('\r','')
  8. self.steamfile.close()
  9. def getVersion(self):
  10. self.version = re.findall(r'PatchVersion=(.+)',self.steaminfo)
  11. return self.version[0]
  12. def getProductName(self):
  13. self.productname = re.findall(r'ProductName=(.+)',self.steaminfo)
  14. return self.productname[0]
  15. def getAppId(self):
  16. self.appid = re.findall(r'appID=(.+)',self.steaminfo)
  17. return self.appid[0]
Advertisement
Add Comment
Please, Sign In to add comment