function nested

Gigs_ gigs at hi.t-com.hr
Thu May 24 05:45:17 EDT 2007


def f(start):
     stack = []
     def f1(start):
         for fname in os.listdir(start):
            path = os.path.join(start, fname)
            if os.path.isfile(path):
                stack.append(path)
            else:
                f1(path)
     f1(start)
     return stack


i feel s stupid right now
forgot to call f1

any comments how to make this better?



More information about the Python-list mailing list