Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Neil Girdhar
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

[Python-ideas] pathlib.Path.walk

2017-04-03 Thread Michel Desmoulin
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):

Re: [Python-ideas] pathlib.Path.walk

2017-04-03 Thread INADA Naoki
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

Re: [Python-ideas] pathlib.Path.walk

2017-04-03 Thread INADA Naoki
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()) >

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Ryan Gonzalez
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: >

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Neil Girdhar
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

Re: [Python-ideas] What about regexp string litterals : re".*" ?

2017-04-03 Thread Juancarlo Añez
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