Exemple #1
0

# parse command line options
try:
    opts, args = getopt.getopt(sys.argv[1:], "", ["key="])
    # Process options
    for o, a in opts:
        if o == "--key":
            key = a
except getopt.error, msg:
    key = raw_input('key: ')

from survival_records import *
players = []
maps = []
records = []
groups = []
import_player_list('players.txt', players)
import_map_list('maps.txt', maps)
records = import_record_list('records.txt', records, players, maps)
err = import_groups_list('groups.txt', groups, players, records, maps)
if err != None:
    print 'Error: %s' % err
print 'done import'

ids = get_xml_page('NorthAmericanSurvivors')
steam.set_api_key(key)
plist = get_player_stats(ids)
check_players(plist, players, groups)
#print '\n'.join(ids)
Exemple #2
0
	f.close()

# parse command line options
try:
	opts, args = getopt.getopt(sys.argv[1:], "", ["key="])
	# Process options
	for o, a in opts:
		if o == "--key":
			key = a
except getopt.error, msg:
	key = raw_input('key: ')

from survival_records import *
players = []
maps = []
records = []
groups = []
import_player_list('players.txt', players)
import_map_list('maps.txt', maps)
records = import_record_list('records.txt', records, players, maps)
err = import_groups_list('groups.txt', groups, players, records, maps)
if err != None:
	print 'Error: %s' % err
print 'done import'

ids = get_xml_page('NorthAmericanSurvivors')
steam.set_api_key(key)
plist = get_player_stats(ids)
check_players(plist, players, groups)
#print '\n'.join(ids)
Exemple #3
0
                    print_item_list([item])
                    print('')
                    break

            if not wrenchpresent:
                print("\x1b[1mWrench missing\x1b[0m")
        except steam.items.Error as E:
            print(str(E))

tests = {"bp": bp_test,
         "schema": schema_test,
         "assets-catalog": assets_test,
         "golden-wrenches": gw_test}

try:
    testmode = sys.argv[2]
    testkey = sys.argv[1]
    tests[testmode]
except:
    sys.stderr.write("Run " + sys.argv[0] + " <apikey> " + "<" + ", ".join(tests) + ">\n")
    raise SystemExit

steam.set_api_key(testkey)

test_schema = steam.tf2.item_schema(lang = "en")

try:
    tests[testmode]()
except KeyError:
    sys.stderr.write(testmode + " is not a valid name, need one of " + ", ".join(tests) + "\n")
Exemple #4
0
                print("\x1b[1mWrench missing\x1b[0m")
        except steam.items.Error as E:
            print(str(E))


tests = {
    "bp": bp_test,
    "schema": schema_test,
    "assets-catalog": assets_test,
    "golden-wrenches": gw_test
}

try:
    testmode = sys.argv[2]
    testkey = sys.argv[1]
    tests[testmode]
except:
    sys.stderr.write("Run " + sys.argv[0] + " <apikey> " + "<" +
                     ", ".join(tests) + ">\n")
    raise SystemExit

steam.set_api_key(testkey)

test_schema = steam.tf2.item_schema(lang="en")

try:
    tests[testmode]()
except KeyError:
    sys.stderr.write(testmode + " is not a valid name, need one of " +
                     ", ".join(tests) + "\n")