>>> from pypb2lib import Server
>>> s = Server('rcon', '109.235.71.123', 30000)
>>> data = s.Status()
>>> data
{'gamename': 'Digital Paint Paintball 2 v1.930(186)', 'protocol': '34', 'elim': '13', '_scores': 'Blue:5 Red:0 ', 'pr': '!2!3!4!7!10', 'gamedir': 'pball', 'timelimit': '15', 'hostname': 'ygame pgp', 'pb': '!5!6!8!9', 'version': '2.00 i386 Aug 19 2015 Linux (41)', 'maxclients': '16', 'location': 'D\xfcsseldorf', 'po': '!0!1', 'needpass': '0', 'sv_login': '1', 'gamedate': 'Aug 19 2015', 'mapname': 'beta/kokain_b1', 'game': 'pball', 'sv_certificated': '0', 'fraglimit': '50', 'gameversion': 'DPPB2 v1.930(186)', 'TimeLeft': '14:46', 'players': [{'score': '0', 'ping': '36', 'name': 'Embla'}, {'score': '0', 'ping': '62', 'name': 'hate_you_guys'}, {'score': '0', 'ping': '85', 'name': '>og<Extrawelt'}, {'score': '0', 'ping': '0', 'name': '.avR|ZalMa'}, {'score': '1', 'ping': '75', 'name': 'naonamem'}, {'score': '2', 'ping': '61', 'name': 'Lofas'}, {'score': '0', 'ping': '144', 'name': 'USFYOBOB64'}, {'score': '0', 'ping': '95', 'name': 'NTFA'}, {'score': '1', 'ping': '168', 'name': 'crazylady'}, {'score': '0', 'ping': '56', 'name': 'planB'}, {'score': '0', 'ping': '158', 'name': 'eliminator.com'}]}
>>> data['mapname']
'beta/kokain_b1'
>>> s.rcon('map airtime') // Change current map to airtime
I apologize for the function naming, I know that it's not pep8 compatible... I didn't know that something like pep8 exists when I was writing it.