Zbyszek Szmek <[email protected]> added the comment:
>>> os.makedirs('/tmp/a/b/c')
>>> gen = os.walk('/tmp/a')
>>> next(gen)
('/tmp/a', ['b'], [])
>>> os.makedirs('/tmp/a/b2')
>>> next(gen)
('/tmp/a/b', ['c'], [])
>>> next(gen)
('/tmp/a/b/c', [], [])
>>> gen = os.walk('/tmp/a', onerror=print)
>>> next(gen)
('/tmp/a', ['b2', 'b'], [])
>>> os.rmdir('/tmp/a/b2')
>>> next(gen)
[Errno 2] No such file or directory: '/tmp/a/b2'
('/tmp/a/b', ['c'], [])
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13779>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com