closing all files when program terminates

Grant Edwards grante at visi.com
Sun Nov 5 12:27:30 EST 2000


In article <UgNM5.3387$CA6.386072 at dfiatx1-snr1.gtei.net>, Jeff Petkau wrote:
><jschmitt at vmlabs.com> wrote in message news:8tvibs$7nv$1 at nnrp1.deja.com...
>> I run this Python program that creates files.  If I use CONTROL-C to
>> abort the Python program, I can't delete the files the Python program
>> opens.  Win2K says that there has been a sharing violation.  Is there a
>> way to close/release all file resources that have opened when the
>> program terminates unexpectedly?
>
>I think it's a problem in Win2K. When a program closes a file, Win2K
>sometimes seems to keep it open (and report sharing violations if you
>try to use it) for up to 20 seconds or so. This is a problem with lots
>of applications, not just Python.
>
>Unfortunately I don't know of any way to turn this ridiculous behavior
>off.

I do, but it's rather drastic...

-- 
Grant Edwards                   grante             Yow!  Wow! Look!! A stray
                                  at               meatball!! Let's interview
                               visi.com            it!



More information about the Python-list mailing list