Bug in glob.glob for files w/o extentions in Windows
Serge Orlov
sombDELETE at pobox.ru
Sun Nov 30 05:08:57 EST 2003
> Anyway, "*." is not a bad DOS convention to select files w/o extention, although
> it comes from the old 8.3 name scheme. BTW, how can you select files w/o
> extention in Unix's shells?
The same way as in Python:
filelist = [file for file in glob.glob('*') if '.' not in file]
Shell:
ls|grep -v [.]
Making up special conventions is not the Python way.
-- Serge.
More information about the Python-list
mailing list