parsing directory for certain filetypes
sam
sam at mas.pl
Mon Mar 10 10:21:00 EDT 2008
royG napisał(a):
> i wrote a function to parse a given directory and make a sorted list
> of files with .txt,.doc extensions .it works,but i want to know if it
> is too bloated..can this be rewritten in more efficient manner?
>
Probably this should be rewriten and should be very compact. Maybe you should
grab string:
find $dirname -type f -a \( -name '*.txt' -o -name '*.doc' \)
and split by "\n"?
--
UFO Occupation
www.totalizm.org
More information about the Python-list
mailing list