This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Implement lwalk(levelwalk) function on os.py
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: os.walk max_depth
View: 26781
Assigned To: Nosy List: andrekorol, r.david.murray
Priority: normal Keywords:

Created on 2017-07-17 05:26 by andrekorol, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
os.py andrekorol, 2017-07-17 05:26 os.py with lwalk function implemented
os.py andrekorol, 2017-07-17 05:40 os.py with lwalk function implemented
Repositories containing patches
https://github.com/andrekorol/cpython
Messages (4)
msg298458 - (view) Author: André Rossi Korol (andrekorol) * Date: 2017-07-17 05:26
I forked cpython and implemented an lwalk function on os.py. The lwalk funtion behaves exactly like walk(), except that it recurses only to a certain level of depth that can be selected by the user. More information on the lwalk function can be found on "os.py" in my cpython fork. It worked fine when I tested the funtion in a local virtual environment, but when I installed Python 3.7 with my lwalk function implemented in os.py I get an error when I try to test it in my recent Python installation: "TypeError: 'NoneType' object is not iterable".
I'd like to know where else I need to add info about my lwalk function so it can be correctly used in a fresh Python installation and so than I can send a Pull Request.
msg298459 - (view) Author: André Rossi Korol (andrekorol) * Date: 2017-07-17 05:40
I forked cpython and implemented an lwalk function on os.py. The lwalk funtion behaves exactly like walk(), except that it recurses only to a certain level of depth that can be selected by the user. More information on the lwalk function can be found on "os.py" in my cpython fork.
I'd like to know what else I need to do in order to send a Pull Request.
msg298460 - (view) Author: André Rossi Korol (andrekorol) * Date: 2017-07-17 05:46
UPDATE: I already fixed the cause of the TypeError I mentioned earlier.
msg298492 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2017-07-17 12:40
Thanks for being interested in improving Python.  Please join the discussion in the existing issue 26781, which proposes a max_depth parameter for walk.
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75125
2017-07-17 12:40:03r.david.murraysetstatus: open -> closed

superseder: os.walk max_depth

nosy: + r.david.murray
messages: + msg298492
resolution: duplicate
stage: resolved
2017-07-17 05:46:15andrekorolsetmessages: + msg298460
2017-07-17 05:40:57andrekorolsethgrepos: - hgrepo369
2017-07-17 05:40:34andrekorolsetfiles: + os.py
hgrepos: + hgrepo370
messages: + msg298459
2017-07-17 05:26:44andrekorolcreate