On Sun, 29 Oct 2006 00:29:06 +0200, Wolfgang Draxinger wrote:

> Steven D'Aprano wrote:
> 
>> Open "the" file? There are potentially two files -- the source
>> and destination. I only want to do the rename if the
>> destination *doesn't* exist, so there is no destination file to
>> open. How will it help me to lock the source file? Have I
>> misunderstood?
> 
> I forgot to say, to open the source file with O_CREAT | O_EXCL.
> The open will fail if the file already exists.

But the source file always exists, otherwise there is nothing to rename!
Do you mean, open the destination filename?



-- 
Steven.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to