Curious issue with simple code

George Sakkis george.sakkis at gmail.com
Tue Sep 19 14:52:46 EDT 2006


codefire wrote:

> Ah of course, isfile(f) can only return true if it can find f! :)
>
> I'm going to investigate those other functions too :)
>
> Thanks a lot guys!
> Tony

By the way, an easier way to deal with paths is the path.py module
(http://www.jorendorff.com/articles/python/path/). Your example could
be rewritten simply as:

from path import path
for html_file in path(start_dir).walkfiles('*.html'):
    print 'html file found!' 

George




More information about the Python-list mailing list