scanf in python
AMD
amdescombes at gmail.com
Tue Jul 22 00:58:29 EDT 2008
Robert Kern a écrit :
> 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/
>
Hi Robert,
I had seen this pure python implementation, but it is not as fast or as
elegant as would be an implementation written in C directly within
python with no need for import.
Cheers,
André
More information about the Python-list
mailing list