[Tutor] Problems with partial string matching

Dave Angel davea at ieee.org
Sun Oct 24 21:52:59 CEST 2010

On 2:59 PM, Josep M. Fontana wrote:
> Hi,
> As I said in another message with the heading "Using contents of a
> document to change file names", I'm trying to learn Python "by doing"
> and I was working on a little project where I had to change the names
> <snip>
> I run this and I don't get any errors. The names of the files in the
> directory, however, are not changed. What am I doing wrong?
> As always, your help is greatly appreciated.
> Josep M.
You call re.sub(), but don't do anything with the result.

Where do you call os.rename() ?


More information about the Tutor mailing list