summaryrefslogtreecommitdiff
path: root/fs/browsewin.py
diff options
context:
space:
mode:
authorwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-01-01 20:18:32 +0000
committerwillmcgugan <willmcgugan@67cdc799-7952-0410-af00-57a81ceafa0f>2010-01-01 20:18:32 +0000
commit72f3d49fa73d0b4e5865e8d8d10b8aabc006148e (patch)
treee371fce423086808958d373d869b3fc66ef3e431 /fs/browsewin.py
parentc093c2c8e33c7e00db54507fe03a212967a68eb5 (diff)
downloadpyfilesystem-git-72f3d49fa73d0b4e5865e8d8d10b8aabc006148e.tar.gz
Documentation, fixes, A ReadOnlyFS wrapper and a plain old FTP FS class
Diffstat (limited to 'fs/browsewin.py')
-rw-r--r--fs/browsewin.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/browsewin.py b/fs/browsewin.py
index eccd6ae..3baef5d 100644
--- a/fs/browsewin.py
+++ b/fs/browsewin.py
@@ -1,5 +1,8 @@
#!/usr/bin/env python
"""
+fs.browsewin
+============
+
Creates a window which can be used to browse the contents of a filesystem.
To use, call the 'browse' method with a filesystem object. Double click a file
or directory to display its properties.
@@ -32,7 +35,7 @@ class InfoFrame(wx.Frame):
self.list_ctrl.SetColumnWidth(1, 300)
for key in keys:
- self.list_ctrl.Append((key, repr(info[key])))
+ self.list_ctrl.Append((key, repr(info.get(key))))
@@ -76,7 +79,6 @@ class BrowseFrame(wx.Frame):
self.Bind(wx.EVT_TREE_ITEM_EXPANDING, self.OnItemExpanding)
self.Bind(wx.EVT_TREE_ITEM_ACTIVATED, self.OnItemActivated)
-
wx.CallAfter(self.OnInit)
def OnInit(self):
@@ -97,7 +99,7 @@ class BrowseFrame(wx.Frame):
return
paths = [(self.fs.isdir(p), p) for p in self.fs.listdir(path, absolute=True)]
-
+
if not paths:
#self.tree.SetItemHasChildren(item_id, False)
#self.tree.Collapse(item_id)
@@ -163,7 +165,7 @@ def browse(fs):
"""Displays a window containing a tree control that displays an FS
object. Double-click a file/folder to display extra info.
- fs -- A filesystem object
+ :param fs: A filesystem object
"""