Exemplo n.º 1
0
def examine(result, type):
    try:
        print('Examining %s ......' % type)

        nt = namedtuple(result, type)
        assert equivalent(result, nt), 'Not equivalent:::::::::::::::\n%s\n::::::::::::::::\n%s' % (result, nt)

        if type == 'Message':
            print('Message glance2: %s' % str(telepot.glance2(result, long=True)))

        pprint.pprint(result)
        pprint.pprint(nt)
        print()
    except AssertionError:
        traceback.print_exc()
        answer = raw_input('Do you want to continue? [y] ')
        if answer != 'y':
            exit(1)
Exemplo n.º 2
0
def examine(result, type):
    try:
        print "Examining %s ......" % type

        nt = namedtuple(result, type)
        assert equivalent(result, nt), "Not equivalent:::::::::::::::\n%s\n::::::::::::::::\n%s" % (result, nt)

        if type == "Message":
            print "Message glance2: %s" % str(telepot.glance2(result, long=True))

        pprint.pprint(result)
        pprint.pprint(nt)
        print
    except AssertionError:
        traceback.print_exc()
        answer = raw_input("Do you want to continue? [y] ")
        if answer != "y":
            exit(1)
Exemplo n.º 3
0
def examine(result, type):
    try:
        print('Examining %s ......' % type)

        nt = namedtuple(result, type)
        assert equivalent(result, nt), 'Not equivalent:::::::::::::::\n%s\n::::::::::::::::\n%s' % (result, nt)

        if type == 'Message':
            print('Message glance2: %s' % str(telepot.glance2(result, long=True)))

        pprint.pprint(result)
        pprint.pprint(nt)
        print()
    except AssertionError:
        traceback.print_exc()
        print('Do you want to continue? [y]', end=' ')
        answer = input()
        if answer != 'y':
            exit(1)