globbing problems

Magnus Lie Hetland mlh at vier.idi.ntnu.no
Fri Jan 18 00:57:19 EST 2002


I'm trying to use globs of the type

  glob(r'c:\Foo Bar\*.foo')

in Windows, but only get returned an empty list. When I use

  fnmatch.filter(os.listdir(r'c:\Foo Bar'), '*.foo')

I get all the files I want, i.e. all the files in the directory ending
with .foo; shouldn't the glob do that too? I've looked in the glob
implementation, but can't find the bug/feature responsible for this.

Am I being dense here, or is there something wrong with the glob
implementation?

--
Magnus Lie Hetland                                  The Anygui Project
http://hetland.org                                  http://anygui.org



More information about the Python-list mailing list