Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#4 closed enhancement (fixed)

Add FTPHost.walk

Reported by: schwa Owned by: schwa
Priority: minor Milestone: 2.1
Component: Library Version: 2.0.3
Keywords: os.walk, os.path.walk, generators, iterators, Python 2.2, Python 2.3 Cc:


Python 2.3 introduced an os.walk function which is much more pythonic than the still existing os.path.walk function.

I'm not sure whether the code of the new function should also be compatible with Python 2.0, like the rest of ftputil 2.0.3. When using generators/iterators (which where introduced in Python 2.2), the implementation would be much easier.

Change History (3)

comment:1 Changed 14 years ago by schwa

Status: newassigned

comment:2 Changed 14 years ago by schwa

Resolution: fixed
Status: assignedclosed

I've added the 'walk' method to FTPHost. It was an easy implementation because I could use the code from Python's os.walk with only small changes. On the other hand, this means that FTPHost.walk will only work with Python versions 2.2 and above. Earlier versions don't support the necessary generators.

comment:3 Changed 14 years ago by schwa

Note: See TracTickets for help on using tickets.