[Tutor] os.rename anomaly in Python 2.3 on Windows XP
cappy2112 at gmail.com
Wed Oct 10 02:08:37 CEST 2007
Unfortunately,os.listdir() returns the same string as glob.glob, for
the problem file I mentioned.
When I pass that string to os.rename()
OSError: [Errno 22] Invalid argument
> Sounds like it has something to do with Unicode.
> Your filenames aren't being interpreted correctly. Perhaps os.listdir
> is giving you the UTF-8 versions
> rather than the Unicode versions of the filenames?
More information about the Tutor