[Tutor] Pythonese/Efficiency/Generalese critique please
Lee Cullens
lee_cullens at mac.com
Sat Jun 4 23:52:53 CEST 2005
Thank you for the critique Javier.
You made some good points that I will play with before moving on.
Beyond that, I intentionally neglected error checking in this
exercise as you may have surmised. Checking input arguments and
handling access restrictions gracefully would indeed be important
components.
The initial os.walk() approach I tried is simple in concept:
pgo = os.walk(base_directory)
for xnode in pgo:
<process node>
but I ended up with much more processing in having to sort the rows
and then blank repeated cells, than the recursive listdir approach
which gave me the desired ordering in one pass.
Lee C
More information about the Tutor
mailing list