Widget that displays a directory tree?

Claudio Grondi claudio.grondi at freenet.de
Mon Jan 16 18:03:38 CET 2006


Fredrik Lundh wrote:
> Claudio Grondi wrote:
> 
> 
>>Christos Georgiou wrote:
>>
>>>On Thu, 12 Jan 2006 11:55:46 -0500, rumours say that "Edward C. Jones"
>>><edcjones at comcast.net> might have written:
>>>
>>>
>>>
>>>>Do any of the Python GUIs have a super-high-level widget that displays a
>>>>directory tree? Most file managers or editors have this type of window.
>>>
>>>
>>>If you have idle installed, you can check the PathBrowser.py file in your
>>>idlelib directory.  (Run idle; click File -> Path Browser to see it in
>>>action, and click File -> Open Module -> PathBrowser -> OK to see/edit the
>>>source).
>>
>>C:\>C:\Python24\python.exe
>>Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
>>win32
>>C:\>C:\Python24\Lib\idlelib\PathBrowser.py
>>Traceback (most recent call last):
>>   File "C:\Python24\Lib\idlelib\PathBrowser.py", line 95, in ?
>>     main()
>>   File "C:\Python24\Lib\idlelib\PathBrowser.py", line 90, in main
>>     PathBrowser(PyShell.flist)
>>AttributeError: 'module' object has no attribute 'flist'
>>
>>Strange ...
> 
> 
> in what way?
> 
> the instructions you didn't read told you to run idle, and select the
> browser via the menu system to see it in action.
> 
> </F>
Yes, you are right. The section
def main():
     import PyShell
     PathBrowser(PyShell.flist)
     if sys.stdin is sys.__stdin__:
         mainloop()
in PathBrowser.py suggested (apparent falsely), that it should run also 
standalone - that was my problem.
Thank you.

Claudio



More information about the Python-list mailing list