I am trying to generate a hierarchical directory listing in pyGTK.
Currently, I have this following directory tree:
/root folderA - subdi
About the performance, this is a FAQ. About your algorithm: when you reach subdirA piter points to subdirA, at the next iteration when you reach a.py piter still points to subdirA.
subdirA
piter
a.py
As you said, use os.walk.
os.walk