On Mon, Apr 3, 2017 at 2:31 AM Mark Lawrence via Python-ideas <
[email protected]> wrote:
> On 03/04/2017 02:22, Neil Girdhar wrote:
> > Same. One day, Python will have a decent parsing library.
> >
>
> Nothing here https://wiki.python.org/moin/LanguageParsing suits your
> needs?
>
No, unf
Like os.walk, but from a Path instance.
We have Path.iterdir, but it's not recursive. Which you use either
os.scandir, or os.walk. In any case, you end up doing:
import os
import pathlib
directory = pathlib.Path(get_dir())
# do things with directory
for root, dirs, files os.walk(directory):
Why not Path.glob?
https://docs.python.org/3.6/library/pathlib.html#pathlib.Path.glob
On Mon, Apr 3, 2017 at 5:33 PM, Michel Desmoulin
wrote:
> Like os.walk, but from a Path instance.
>
> We have Path.iterdir, but it's not recursive. Which you use either
> os.scandir, or os.walk. In any case, you
On Mon, Apr 3, 2017 at 5:33 PM, Michel Desmoulin
wrote:
> Like os.walk, but from a Path instance.
>
> We have Path.iterdir, but it's not recursive. Which you use either
> os.scandir, or os.walk. In any case, you end up doing:
>
> import os
> import pathlib
>
> directory = pathlib.Path(get_dir())
>
Have you tried PyParsing and/or Grako? They're some of my favorites (well,
I like PLY too, but I'm thinking you wouldn't like it too much).
--
Ryan (ライアン)
Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else
http://refi64.com
On Apr 3, 2017 3:26 AM, "Neil Girdhar" wrote:
>
I've tried PyParsing. I haven't tried Grako.
On Mon, Apr 3, 2017 at 8:54 AM Ryan Gonzalez wrote:
> Have you tried PyParsing and/or Grako? They're some of my favorites (well,
> I like PLY too, but I'm thinking you wouldn't like it too much).
>
> --
> Ryan (ライアン)
> Yoko Shimomura > ryo (supercell
On Mon, Apr 3, 2017 at 8:57 AM, Neil Girdhar wrote:
> I've tried PyParsing. I haven't tried Grako.
>
Caveat: I'm the author of Grako.
It's very easy to do complex parsing with Grako. The grammar can be
embedded in a Python string, and the compiled grammar can be used for
parsing without genera