renaming files

Mark McEahern marklists at mceahern.com
Mon Jan 6 23:54:10 EST 2003


> I can't find no easy way. I don't want to use a system call to 
> 'ls', so got a list of files with os.listdir(), but how can I 
> get a selective list?

import glob
for name in glob.glob('*.whatever'):
  print name

// m
-






More information about the Python-list mailing list