Scanner class

George Sakkis george.sakkis at gmail.com
Tue Dec 2 12:33:00 EST 2008


On Dec 1, 5:42 pm, Arnaud Delobelle <arno... at googlemail.com> wrote:
> George Sakkis <george.sak... at gmail.com> writes:
> > Is there any stdlib or (more likely) 3rd party module that provides a
> > similar functionality to the java.util.Scanner class [1] ? If not,
> > would there be any interest in porting it (with a more Pythonic API of
> > course) or are there better alternatives ?
>
> > George
>
> > [1]http://java.sun.com/j2se/1.5.0/docs/api/java/util/Scanner.html
>
> Have you looked at:
>
> >>> import re
> >>> re.Scanner
>
> <class re.Scanner at 0x759f0>
>
> Last time I checked it was undocumented though, although I vaguely
> recall a Cookbook recipe.  Ah here it is:
>
> http://code.activestate.com/recipes/457664/

Thanks, didn't know about it. I also found Plex [1] which seems more
powerful.

George

[1] http://www.cosc.canterbury.ac.nz/greg.ewing/python/Plex/version/doc/index.html



More information about the Python-list mailing list