summaryrefslogtreecommitdiffstats
path: root/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py
diff options
context:
space:
mode:
Diffstat (limited to 'AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py')
-rw-r--r--AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py b/AppPkg/Applications/Python/Python-2.7.2/Demo/pdist/sumtree.py
new file mode 100644
index 0000000000..3c82282461
--- /dev/null
+++ b/AppPkg/Applications/Python/Python-2.7.2/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()