On Jul 13, 2:44 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Thomas Heller wrote: > > [EMAIL PROTECTED] schrieb:= > > >> ...Do the NT file systems support [renaming an open file] (which I think is > >> standard for POSIX systems)? > > > Yes, you can do that. We implemented something like this to replace > > dlls there are currently in use... > > You do have to be careful though, because sometimes Windows refuses to > let you rename a file because it's in use.
At least on my laptop I see Steve's behaviour. fwiw: C:\Documents and Settings\aaron\Desktop>opentest.py rename rename sleeps 1 renamer sleeping 5 now renaming Traceback (most recent call last): File "C:\Documents and Settings\aaron\Desktop\opentest.py", line 69, in <modul e> renameProcess() File "C:\Documents and Settings\aaron\Desktop\opentest.py", line 31, in rename Process os.rename(firstname, secondname) WindowsError: [Error 13] The process cannot access the file because it is being used by another process So it looks like the answer in general is "no: you can't do that on Windows." Drat! Foiled again. -- Aaron Watters === Is a bear catholic? Does the Pope ...? -- http://mail.python.org/mailman/listinfo/python-list