Exemple #1
0
def main(num):
    if num == 1:
        s.run(start=False)
    else:
        live_id_list, live_desc = s.get_rooms()
        for index, desc in enumerate(live_desc):
            print "场次:%s  %s" % (index, desc.encode('utf-8'))
        match_id = None
        live_count = len(live_id_list)
        while match_id is None:
            try:
                match_id = int(raw_input('请选择正确的场次: '))
                assert (match_id < live_count)
            except:
                match_id = None

        l = Live(live_id_list[match_id])
        l.run()