diff options
Diffstat (limited to 'py/demo/book/simple_filesystem/Client.py')
-rwxr-xr-x | py/demo/book/simple_filesystem/Client.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/py/demo/book/simple_filesystem/Client.py b/py/demo/book/simple_filesystem/Client.py index 7d3fb0cb7c6..23caad1fb21 100755 --- a/py/demo/book/simple_filesystem/Client.py +++ b/py/demo/book/simple_filesystem/Client.py @@ -29,15 +29,15 @@ def listRecursive(dir, depth): for node in contents: subdir = Filesystem.DirectoryPrx.checkedCast(node) file = Filesystem.FilePrx.uncheckedCast(node) - print indent + node.name(), + sys.stdout.write(indent + node.name() + " ") if subdir: - print "(directory):" + print("(directory):") listRecursive(subdir, depth) else: - print "(file):" + print("(file):") text = file.read() for line in text: - print indent + "\t" + line + print(indent + "\t" + line) status = 0 ic = None @@ -56,7 +56,7 @@ try: # Recursively list the contents of the root directory # - print "Contents of root directory:" + print("Contents of root directory:") listRecursive(rootDir, 0) except: traceback.print_exc() |