def PrintTransactions(transactions):
 print '    Transactions:'
 fmt = '    %4s %-23s %-10s %6s %-11s %-11s'
 print (fmt % ('ID', 'Date', 'Type', 'Shares', 'Price', 'Commission'))
 for txn in transactions:
  d = txn.transaction_data
  print (fmt % (txn.transaction_id, (d.date or '----'), d.type, d.shares, d.price.money[0], d.commission.money[0]))
  if d.notes:
   print '         Notes:', d.notes
 print

def PrintTransactions ( transactions ) : print '    Transactions:' fmt = '    %4s %-23s %-10s %6s %-11s %-11s' print ( fmt % ( 'ID' , 'Date' , 'Type' , 'Shares' , 'Price' , 'Commission' ) ) for txn in transactions : d = txn . transaction_data print ( fmt % ( txn . transaction_id , ( d . date or '----' ) , d . type , d . shares , d . price . money [ 0 ] , d . commission . money [ 0 ] ) ) if d . notes : print '         Notes:' , d . notes print
print transactions .