scanf in python

Robert Kern robert.kern at gmail.com
Mon Jul 21 19:48:21 EDT 2008


AMD wrote:
> Hello,
> 
> I often need to parse strings which contain a mix of characters, 
> integers and floats, the C-language scanf function is very practical for 
> this purpose.
> I've been looking for such a feature and I have been quite surprised to 
> find that it has been discussed as far back as 2001 but never 
> implemented.

The second Google hit is a pure Python implementation of scanf.

   http://hkn.eecs.berkeley.edu/~dyoo/python/scanf/

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco




More information about the Python-list mailing list