[issue13929] fnmatch to support escape characters

2012-10-15 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Issue8402 has discussion and patch(es). -- nosy: +serhiy.storchaka resolution: -> duplicate status: open -> closed superseder: -> Add a way to escape metacharacters in glob/fnmatch ___ Python tracker

[issue13929] fnmatch to support escape characters

2012-02-04 Thread Terry J. Reedy
Terry J. Reedy added the comment: If indeed fnmatch does not match current shells, then I would agree that it should. It looks to me so easy to add that I though it must be a deliberate decision to exclude. In translate: ... elif c == '\': if i < n-1: c2 = p

[issue13929] fnmatch to support escape characters

2012-02-04 Thread Éric Araujo
Éric Araujo added the comment: > [fnmatch] explicitly disclaims the feature you request: "Be aware there is no > way to quote > meta-characters." This reads like a warning to me, i.e. a potential future feature, not a design choice. > What you are asking for in something in between the unix

[issue13929] fnmatch to support escape characters

2012-02-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: The doc chapters are entitled "fnmatch — Unix filename pattern matching" and "glob — Unix style pathname pattern expansion". The first explicitly disclaims the feature you request: "Be aware there is no way to quote meta-characters.", suggests using re for an

[issue13929] fnmatch to support escape characters

2012-02-02 Thread Israel Fruchter
New submission from Israel Fruchter : fnmatch to support escape characters: like that: >>> name = "Document[Ver.2].doc" >>> pattern = "*\[Ver.2\]*" >>> fnmatch.fnmatch(name, pattern) True that's also fix glob module: >>> pattern = "ipconfig /\?" >>> glob.glob(pattern) "ipconfig /?" --