Is pythonic version of scanf() or sscanf() planned?
Ben Sizer
kylotan at gmail.com
Thu Oct 8 12:33:56 EDT 2009
On Oct 3, 11:06 pm, ryniek90 <rynie... at gmail.com> wrote:
> Hi
>
> I know that in python, we can do the same with regexps or *.split()*,
> but thats longer and less practical method than *scanf()*. I also found
> that (http://code.activestate.com/recipes/502213/), but the code
> doesn't looks so simple for beginners. So, whether it is or has been
> planned the core Python implementation of *scanf()* ? (prefered as a
> batteries included method)
Perhaps struct.unpack is close to what you need? Admittedly that
doesn't read from a file, but that might not be a problem in most
cases.
--
Ben Sizer
More information about the Python-list
mailing list