Talk:Walk a directory/Recursively: Difference between revisions

(→‎symlinks?: Python optionally follows links, (with a warning).)
Line 21:
::'''Note:''' Be aware that setting ''followlinks'' to True can lead to infinite recursion if a link points to a parent directory of itself. walk() does not keep track of the directories it visited already.
:There is also a note and '''warning about using relative pathnames''' and the assumption that code will not change the current directory during calls to os.walk. --[[User:Paddy3118|Paddy3118]] 06:04, 13 June 2011 (UTC)
 
:: Yes, I have no doubt a proper library would have thought about it. But some of the code samples didn't use a library and just used recursion, which can have funny results. I guess it's ok for examples here, though. And I don't know why I said "harlink" above, bah. --[[User:Ledrug|Ledrug]] 06:57, 13 June 2011 (UTC)
Anonymous user