Re: [Tutor] os.rename anomaly in Python 2.3 on Windows XP

2007-10-10 Thread Terry Carroll
On Tue, 9 Oct 2007, Tony Cappellini wrote: > Unfortunately,os.listdir() returns the same string as glob.glob, for > the problem file I mentioned. Tony -- Try specifying the argument to os.listdir as a unicode string. I've found that cures many ailments like this. e.g., instead of something lik

Re: [Tutor] os.rename anomaly in Python 2.3 on Windows XP

2007-10-09 Thread Tony Cappellini
Thanks. 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

Re: [Tutor] os.rename anomaly in Python 2.3 on Windows XP

2007-10-09 Thread Tim Golden
Tony Cappellini wrote: > Using Windows XP, SP2 and Python 2.3 > > I've written a script which walks through a bunch of directories and > replaces characters which are typically illegals as filenames, with an > '_' character. [...] > When my script encounters a directory with the unwanted charact

Re: [Tutor] os.rename anomaly in Python 2.3 on Windows XP

2007-10-08 Thread Luke Paireepinart
Tony Cappellini wrote: > Using Windows XP, SP2 and Python 2.3 > > I've written a script which walks through a bunch of directories and > replaces characters which are typically illegals as filenames, with an > '_' character. > > The directories are part of a package of software which is released by

[Tutor] os.rename anomaly in Python 2.3 on Windows XP

2007-10-08 Thread Tony Cappellini
Using Windows XP, SP2 and Python 2.3 I've written a script which walks through a bunch of directories and replaces characters which are typically illegals as filenames, with an '_' character. The directories are part of a package of software which is released by a group of people from Japan, and