def dump_tokens(s):
 f = StringIO(s)
 for (type, token, start, end, line) in generate_tokens(f.readline):
  if (type == ENDMARKER):
   break
  type = tok_name[type]
  print ('%(type)-10.10s %(token)-13.13r %(start)s %(end)s' % locals())

def dump_tokens ( s ) : f = StringIO ( s ) for ( type , token , start , end , line ) in generate_tokens ( f . readline ) : if ( type == ENDMARKER ) : break type = tok_name [ type ] print ( '%(type)-10.10s %(token)-13.13r %(start)s %(end)s' % locals ( ) )
print out the tokens in s in a table format .