Hello,
new to python, so please go easy on me!
I am using
for f in os.listdir(watch_dir):
tree = ET.parse(f)
for shot in tree.findall('Shot'):
..do stuff..
to scan a directory for specific files (xml files specifically).
But my script fails if, for example, a directory also exists in
"watch_dir"
How can i restructure this so it only returns a list of the .xml files
in that directory, ignores other files and or directories in "watch_dir"
Thanks!
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor