[Tutor] os.listdir fn
kent37 at tds.net
Fri Dec 10 19:32:18 CET 2004
Have you looked at the glob module?
>>> import glob
['src\\jdbc.properties', 'src\\jdbc_local.properties', 'src\\jdbc_qa.properties',
'src\\jdbc_test.properties', 'src\\log4j.jnlp.properties', 'src\\log4j.properties',
> I need to get the equivalent of 'ls script.icons/*.script'
> I looked around in the os module but can't find anything appropriate.
> That is, filename globbing doesn't seem to work. Looks like I'll have to
> use map/filter to do this. Is there a better way?
More information about the Tutor