Chris Rebert wrote:
> On Mon, Aug 9, 2010 at 3:19 AM, Peter Otten <[email protected]> wrote:
>> Warning: I don't remember how Windows handles this, but unix will happily
>> perform os.rename("alpha/alpha.txt", "beta/beta.txt") and overwrite
>> beta/beta.txt with alpha/alpha.txt.
>>
>> I'd rather modify the filename before joining it with the directory.
>
> Er, unless I'm really missing something, that's what my code already
> does. Perhaps you misread it? The replace() clearly happens before the
> 2nd join(). I took special care to account for and avoid the potential
> problem you're talking about.
You're right. Sorry for the confusion.
Peter
--
http://mail.python.org/mailman/listinfo/python-list