usage   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 0
1
#!/usr/bin/python
2
# -*- coding: utf-8 -*-
3
#
4
# This is an example usage
5
from pprint import pprint
6
7
from tw_serverinfo import GameServers
8
from tw_serverinfo import MasterServers
9
10
if __name__ == '__main__':
11
    m = MasterServers()
12
    g = GameServers()
13
    # master server example
14
    pprint(m.master_servers)
15
    print('amount of game servers: {amount:d}'.format(amount=len(m.game_servers)))
16
    # request the server info for the game servers
17
    g.fill_server_info(m.game_servers)
18
    for game_server in m.game_servers:
19
        pprint(game_server)
20