[Python-ideas] Add OS-dependent automatic glob support

random832 at fastmail.us random832 at fastmail.us
Mon Jan 5 02:33:48 CET 2015


On Sun, Jan 4, 2015, at 19:57, Steven D'Aprano wrote:
> On Sun, Jan 04, 2015 at 06:10:01PM -0500, random832 at fastmail.us wrote:
> > Another separate but related issue is the fact that windows wildcards do
> > not behave in the same way as python glob patterns.
> 
> I don't understand why you say this. As I understand it, there is no 
> such thing as "Windows wildcards" as every application which wants to 
> support wildcards has to implement their own. If you want to know what 
> kinds of globbing wildcards the application supports, you have to read 
> the application documentation. (Or guess.)

Wildcards are built into the FindFirstFile/FindNextFile (and thereby the
_tfindfirst/next) API used for enumerating directories, and users do not
generally expect to be able to apply wildcards to path components other
than the last one. These functions are used by applications, and
generally by libraries provided in higher-level languages.

> I am not a Windows expert, so I may have been misinformed. Anyone care 
> to comment?


More information about the Python-ideas mailing list