title: python gui tree walk
body: <p>I am trying to figure out how to walk a tree and then display the output in a window that a user can navigate through much like that on the left hand side of my computer. Eventually I plan to have a fully browsable window just like you have on the right hand side. Here is what I have so far, I guess it is a mix of pseudo and actual code. This is for use on a Linux machine using python. I'm not looking for any code but mainly help as to how I can accomplish this with tkinter. Perhaps it is just me but I cannot find much help that helps me solve my problem - most just tell me how to display the directories etc. Any help would be greatly appreciated.</p>
  
  <p>I want this window to look like this</p>
  
  <pre><code>My Documents &lt;--------starting directory
      My pictures&lt;------subdirectory
          picture1.jpg&lt;-inside of subdirectoy
          picture2.jpg
      1234.exe&lt;---------random file inside of my documents
  </code></pre>
  
  <p>I want to have a small folder picture next to a directory or a subdirectory also.</p>
  
  <pre><code>start at root
       create window with tk
       for dirname,subdirList,filelist in os.walk(root)
       create new item(dirname)   
       for i in subdirList:         #not sure what I would have to do to only    
                                             have subdirs showing once the directory was
                                             clicked once
          append i to item 1       
      for fname in fileList:          
          append fname to item 1      
      else:                    
          item +=1            
  </code></pre>