diff options
author | Guido van Rossum <guido@python.org> | 1995-04-10 11:40:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1995-04-10 11:40:52 (GMT) |
commit | 07a272d9dec67f8eb4f2bf1396a2f13671fdaba2 (patch) | |
tree | 5222965ba7973a2dd6848ea4d4a4cf5594e406db /Demo/pdist/sumtree.py | |
parent | 21bc15b73da1e3e5ab60ff9b93a95bfd390fea3f (diff) | |
download | cpython-07a272d9dec67f8eb4f2bf1396a2f13671fdaba2.zip cpython-07a272d9dec67f8eb4f2bf1396a2f13671fdaba2.tar.gz cpython-07a272d9dec67f8eb4f2bf1396a2f13671fdaba2.tar.bz2 |
commit -- why not
Diffstat (limited to 'Demo/pdist/sumtree.py')
-rwxr-xr-x | Demo/pdist/sumtree.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Demo/pdist/sumtree.py b/Demo/pdist/sumtree.py new file mode 100755 index 0000000..92c1fd0 --- /dev/null +++ b/Demo/pdist/sumtree.py @@ -0,0 +1,24 @@ +import time +import FSProxy + +def main(): + t1 = time.time() + #proxy = FSProxy.FSProxyClient(('voorn.cwi.nl', 4127)) + proxy = FSProxy.FSProxyLocal() + sumtree(proxy) + proxy._close() + t2 = time.time() + print t2-t1, "seconds" + raw_input("[Return to exit] ") + +def sumtree(proxy): + print "PWD =", proxy.pwd() + files = proxy.listfiles() + proxy.infolist(files) + subdirs = proxy.listsubdirs() + for name in subdirs: + proxy.cd(name) + sumtree(proxy) + proxy.back() + +main() |