code: def read_token(fd):
      
      out = ''
      # Skip initial whitespace.
  
      while 1:
          ch = fd.read(1)
          if ch.isspace(): continue
          elif len(ch) == 0: return out
          else: break
  
      while not ch.isspace():
          out = out + ch
          ch = fd.read(1)
          if len(ch) == 0: break
  
      return out
docs: Read a single token (sequence of non-whitespace characters) from the
      given file object.
  
      Notes
      -----
      Consumes the first whitespace character after the token.