2009/3/7 Emad Nawfal (عماد نوفل) <[email protected]>:
> import glob
> for path in glob.iglob("*.temp"):
> infile = open(path)
> for line in infile:
> print line.strip()
import glob
files = sorted(glob.glob("*.temp"))
for each in files:
print open(each).read()
Note couple of things:
- glob.glob
- sorted to arranged in order.
- just read() the fhandle to read the contents.
--
Senthil
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor