Why does this (very simple piece of) code does not work?

Richard Brodie R.Brodie at rl.ac.uk
Mon Aug 16 15:16:21 CEST 2004


"jblazi" <jblazi at hotmail.com> wrote in message news:pan.2004.08.16.13.03.51.421000 at hotmail.com...

>        y = 'Kapustin (Hamelin): '+x
>        os.rename(x,y)
> OSError: [Errno 22] Invalid argument

You didn't say what platform you are on but if it's Windows, then
colons aren't allowed in filenames.





More information about the Python-list mailing list