def my_BidAsk(msg):
    print 'bid_ask'
    print msg
    
    if msg.field == 1:
        print (contractTuple[0],  msg.price) % '%s: bid: %s'
    elif msg.field == 2:
        print '%s: ask: %s' % (contractTuple[0],  msg.price)
dataset/ETHPy150Open cmorgan/trading-with-python/cookbook/connectToTWS.py/my_BidAsk/swapped operands of `%`