Can’t be hard, but I’m having a mental block.
Jaysus, `listdir`. Mental block lifted, thank you kindly.
Paul D. Waite
2010-05-03 16:03:20
+5
A:
import os
os.listdir("/home/username/www/")
glob.glob("/home/username/www/*")
The glob.glob method above will not list hidden files.
Trey
2010-05-03 15:58:40
+1
A:
os.walk can be used if you need recursion:
import os
for path,dirs,files in os.walk('.'):
for fn in files:
print os.path.join(path,fn)
Mark Tolonen
2010-05-03 16:29:46