I am on python 2.6 for Windows.
I use os.walk to read a file tree. Files may have non-7-bit characters (German \"ae\" for example) in their filenames. These are enco
If you pass a Unicode string to os.walk(), you'll get Unicode results:
os.walk()
>>> list(os.walk(r'C:\example')) # Passing an ASCII string [('C:\\example', [], ['file.txt'])] >>> >>> list(os.walk(ur'C:\example')) # Passing a Unicode string [(u'C:\\example', [], [u'file.txt'])]