No, brackets are all there. Just tried: # Compute a set of current fullpaths fullpaths = set() path = "/home/nikos/www/data/apps/"
for root, dirs, files in os.walk(path): for fullpath in files: fullpaths.add( os.path.join(root, fullpath) ) print (fullpath ) print (fullpath.encode('iso-8859-7').decode('latin-1') ) sys.exit(0) ========================= root@nikos [~]# [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] Error in sys.excepthook: [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] ValueError: underlying buffer has been detached [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] Original exception was: [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] Traceback (most recent call last): [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] File "files.py", line 61, in <module> [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] print (fullpath ) [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] File "/usr/local/lib/python3.3/codecs.py", line 355, in write [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] data, consumed = self.encode(object, self.errors) [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] UnicodeEncodeError: 'utf-8' codec can't encode character '\\udcc5' in position 0: surrogates not allowed [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] Premature end of script headers: files.py [Tue Jun 04 17:16:18 2013] [error] [client 46.12.95.59] File does not exist: /home/nikos/public_html/500.shtml ================= What are these 'surrogate' things? -- http://mail.python.org/mailman/listinfo/python-list